To solve Animated: `useNativeDriver` was not specified issue of ReactNativeBase Input follow any of the below methods.
Contents
Error log
[WARN] Animated: `useNativeDriver` was not specified. This is required option and must be explicitly set to 'true' or 'false' in Item.
How to solve Animated: `useNativeDriver` was not specified issue of ReactNativeBase ?
Add useNativeDriver : true to the config.
Animated.timing(this.state.animatedValue, {
toValue: 1,
duration: 500,
useNativeDriver: true, // Add this line
}).start();
While using Animated.event()
, add useNativeDriver: false or true
to the animation config as well.
<Animated.ScrollView
scrollEventThrottle={1}
onScroll={Animated.event(
[{ nativeEvent: { contentOffset: { y: this.state.animatedValue } } }],
{ useNativeDriver: true } // Add the specific line
)}
>{content}
</Animated.ScrollView>
Hope it works.
Also Read : ImportError: cannot import name ‘sysconfig’ from ‘distutils’ (/usr/lib/python3.8/distutils/__init__.py)