As I understand this error can occur in a number of different use cases. Here is what happened in this use case
PanResponder
and this is reset at certain intervals to create an infinite scroll effect. The error is thrown in the Child View of the PanResponsder
with the mismatch resulting from the translate: [{transform}]
I believe.
Why does the code function fine except for smaller gestures? What casuses the error?
I ended up resolving the issue.
In this case, it was specific to a PanResponder
, but I believe this can occur in other situations as well, the error tracking should be similar. A moveY variable on the PanResponder
went beyond a threshold set elsewhere. This resulted in translateY
being set to NaN which threw the above error. This results in a mismatch in props.
PanResponder
)Animated
transform
: translatex
/translateY
)I got this error when i mistakenly passed a closure as a second argument to AsyncStorage instead of the string literal i needed to store
AsyncStorage.setItem('loggedIn', (err, result) => {
console.log('I am logged In');
});
The correct thing to do is
AsyncStorage.setItem('loggedIn', 'my-jwt-token', (err, result) => {
console.log('I am logged In');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With