react-native-segment-control icon indicating copy to clipboard operation
react-native-segment-control copied to clipboard

warn: Animated.event now requires a second argument for options

Open Liuone opened this issue 2 years ago • 0 comments
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

Liuone avatar Jul 03 '23 09:07 Liuone