Skip to content

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

Description

@Liuone

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions