Animated: `useNativeDriver` was not specified
See original GitHub issueIssue Description
I am getting this warn in React-native-gifted-chat while rendring Image in the chat screen,that Animated: useNativeDriver
was not specified and animations for opening and closing image are also not working as expected
Steps to Reproduce / Code Snippets
- Just make a new project with given code in Readme.MD file of this repo
- install dependencies and start project
- try to reder image in chat screen by adding a img key in the message object
- Run the project
Expected Results
Animations should run fine without any warn
Additional Information
- Nodejs version: 12.6.3
- React version: 16.11.0
- React Native version: 0.62.0
- react-native-gifted-chat version: 0.16.1
- Platform(s) (iOS, Android, or both?): Android
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:23
Top Results From Across the Web
Animated: `useNativeDriver` was not specified issue of ...
It gives a warning message: Animated: useNativeDriver was not specified. This is a required option and must be explicitly set to true or ......
Read more >Animated: useNativeDriver was not specified. This is ... - GitHub
Animated: useNativeDriver was not specified. This is a required 'option and must be explicitly set to true or false #28558.
Read more >How to Fix Animated: `useNativeDriver` was not specified ...
1- First solution for Animation and Animatable As the warning says, we need to specify the useNativeDriver option explicitly and set it to...
Read more >Animated useNativeDriver was not specified This is a required ...
The error Animated useNativeDriver was not specified This is a required option and must be explicitly set to 'true' or 'false' comes when...
Read more >Animated: `useNativeDriver` was not specified issue of ...
Solution: As the warning says, we need to specify the useNativeDriver option explicitly and set it to true or false . 1- Animation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So I resolved my issue:
npm install -g patch-package
patches
and insidepatches
folder create a file with name:react-native-lightbox+0.8.1.patch
with the following content:patch-package
.You can also add it to postinstall inside package.json so that You dont have to be repeated every time node_modules is removed. This is my favorite command:
@georgeMorales What I did to solve this was copy the Lightbox and LightboxOverlay components from https://github.com/oblador/react-native-lightbox into my own project and add the useNativeDriver options like in https://github.com/oblador/react-native-lightbox/pull/132. After that I used the
renderMessageImage
property of GiftedChat to render my custom Lightbox implementation. You can use the GiftedChat code here to see how: https://github.com/FaridSafi/react-native-gifted-chat/blob/master/src/MessageImage.tsx