2016-02-27 75 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 
相關問題