2016-02-27 77 views
2

我在某些页面上遇到了这个错误,而不是全部,但无法追踪到我的代码中的任何内容。React Native“this._easing不是函数”with v0.20

红色错误模态,从模拟器:

this._easing is not a function. (In 'this._easing((now-this._startTime)/this.duration)', 'this._easing is NaN') 


onUpdate 
AnimatedImplementation.js @ 216:8 

CallTimer 

callTimers 

__callFunction 

<unknown> 

guard 

CallFunctionreturnFlusedQueue 

可以升级项目v0.20,清洁Xcode的构建/运行和RN包,以防万一。我很确定我的代码也没有使用动画库。

回答

3

这是一个较旧的职位,但我发现这个通过谷歌因此希望这可以帮助一些人在那里。

对于bounceease缓解,如果您不修改默认参数,则不需要调用该函数。

// this should error 
Animated.timing(this.state.animatedValue, { 
    toValue: 10, 
    duration: 300, 
    easing: Easing.bounce() 
}).start(); 

如果你只是通过参考bounce相反,错误会自行消失。

easing: Easing.bounce 
相关问题