question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

useNativeDriver breaks functionality

See original GitHub issue

Since useNativeDriver: true is now in defaultProps, this https://github.com/facebook/react-native/issues/16218 has started to occur by default. Using useNativeDriver={false} works as expected. Probably a bug in react-native’s Animated API, but they’ve closed that issue even though it was not fixed. Unless there is a way to work around this, I’d suggest removing useNativeDriver from defaultProps. Maybe someone got it to work with the latest version?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aboveyunhaicommented, Sep 4, 2020

Oh that might be the issue. I am trying to use useNativeDriver with all animations to lighten the JS thread.

Good to know.

Not only for this package, there are a lot of cases where useNativeDriver: true will crush your app especially playing around with react-native-svg. This option is not well supported AFAIK. You might be aware of that.

0reactions
williamgoodhewcommented, Sep 28, 2020

I am still getting this issue on Android using

“react-native”: “0.62.2”, “react”: “16.11.0”, “react-native-circular-progress”: “^1.3.6”,

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple animations which use "useNativeDriver" do not work if ...
Since it doesn't result in a major loss of functionality and there's a workaround it probably doesn't have a very high priority. I'm...
Read more >
When to use useNativeDriver in React Native? - Stack Overflow
Since Animated produces a graph of animated nodes, it can be serialized and sent to native only once when the animation starts, eliminating...
Read more >
Animations - React Native
Let's break down what's happening here. ... Easing functions are typically used in animation to convey gradual acceleration and deceleration ...
Read more >
Using 'useNativeDriver' in react-native animations effectively
React-native allows us to easily create beautiful animations easily using the Animated class. However, unless we specify 'useNativeDriver' ...
Read more >
How Animations Work in React Native - freeCodeCamp
The folks at React Native allow you as a developer to provide a property called useNativeDriver as a boolean value when you're constructing ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found