Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Liuone opened this issue Jul 3, 2023 · 0 comments
Open

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

Liuone opened this issue Jul 3, 2023 · 0 comments

Comments

@Liuone
Copy link

Liuone commented Jul 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant