react-native-segment-control
react-native-segment-control copied to clipboard
warn: Animated.event now requires a second argument for options
trafficstars
react-native: 0.68.6 react: 17.0.2 react-native-segment-control: 1.0.5
Swipe and click encounter warn: Animated.event now requires a second argument for options Solution: react-native-segment-control/index.js (116) Original code:
handleOnScroll = x => {
const mover = Animated.event([
{ nativeEvent: { contentOffset: { x: this.state.scrollX } } }
]);
mover(x);
};
Suggest changes:
handleOnScroll = x => {
const mover = Animated.event([
{ nativeEvent: { contentOffset: { x: this.state.scrollX } } }
], {useNativeDriver: false});
mover(x);
};
warn Reason: a second argument for options