我正在尝试使用插值动画查看.我想得到我的Animated.Value的当前值,但不知道如何.我不明白如何使用React-native docs.
this.state = {
translateAnim: new Animated.Value(0)
}
DeviceEventEmitter.addListener('Accelerometer', function (data) {
console.log(this.state.translateAnim);
// returns an object, but I need a value in current moment
}
Run Code Online (Sandbox Code Playgroud)