shahen94 / react-native-switch

Customisable switch component for RN
MIT License
296 stars 172 forks source link

React Native warning Animated: 'useNativeDriver' #93

Open Girum opened 3 years ago

Girum commented 3 years ago

Hi. I used the library recently, and jad no problem. But, when I used today, the React NAtive throws the warning for useNativeDriver. Do you resolve this in a new PR, or has a way in the props to do that?

f4z3k4s commented 3 years ago

Experiencing the same.

EvangelosVorgias commented 3 years ago

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

sargsyanPicsart commented 3 years ago

Experiencing the same.

IgarMikhailov commented 3 years ago

Experiencing the same.

tlgync commented 3 years ago

node_modules -> react-native-switch -> lib -> Switch.js

Add useNativeDrive:false to these lines.

Ekran Resmi 2021-08-07 14 46 28

nkemcels commented 2 years ago

@tlgync Hmm... Editing files in the node modules folder is not a good idea.

tlgync commented 2 years ago

@tlgync Hmm... Editing files in the node modules folder is not a good idea.

you need to fork it.

hupptechnologies commented 2 years ago

@tlgync Hmm... Editing files in the node modules folder is not a good idea.

@nkemcels Yes but using the patch-package we can have the permanent fix by changing code in node modules.

petros-g commented 3 months ago

library is not leveraging UI thread. Use this to solve your issue: react-native switch