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

3 Warnings: ComponentWillMount ComponentWillReceiveProps, Use NativeDriver #18

Open
stephanoparaskeva opened this issue May 6, 2020 · 6 comments

Comments

@stephanoparaskeva
Copy link

stephanoparaskeva commented May 6, 2020

Screenshot 2020-05-06 at 03 38 34

Screenshot 2020-05-06 at 03 40 30

Screenshot 2020-05-06 at 03 40 50

React Native Version 0.62
Change willMount and willReceiveProps, explicitly set NativeDriver to true

@stephanoparaskeva stephanoparaskeva changed the title 3 Warnings: ComponentWillMount ComponentWillUpdate, Use NativeDriver 3 Warnings: ComponentWillMount ComponentWillReceiveProps, Use NativeDriver May 6, 2020
@ezequiasaramburu
Copy link

willMount and willReceiveProps stills throw Warning.
NativeDriver has been fixed 2 months ago

@brambang
Copy link

brambang commented Jun 3, 2020

same issue, why not have been update?

@daksh23
Copy link

daksh23 commented Sep 8, 2020

Animated: useNativeDriver was not specified. This is a required option and must be explicitly set to true or false

@snehadange
Copy link

Animated: useNativeDriver was not specified. This is a required option and must be explicitly set to true or false

i also get same warning why is it so?

@Chhantea
Copy link

Chhantea commented Oct 5, 2020

manually download src file and update it manually and import to your project or wait for owner to change or update

@Chhantea
Copy link

My solution: Manually copy code from src >> Edit Carousel.tsx (add useNativeDriver:false on line 50) and import your file to your project. Done!! Ps dont forget to restart.

eg:
public static defaultProps: CarouselProps = {
pageSize: Dimensions.get('window').width,
index: 0,
loop: true,
autoplay: true,
autoplayTimeout: 5000,
slipFactor: 1,
showsPageIndicator: true,
pageIndicatorOffset: 16,
animation: (animate, toValue) => {
return Animated.spring(animate, {
toValue: toValue,
friction: 10,
tension: 50,
useNativeDriver:false // <----- here
});
}
};

For others error just add unsafe_ on those willReceiveProps etc... etc..

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

5 participants