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 is required in Animation.Timing calls in newer versions of React Native

See original GitHub issue

Describe the feature

in Animated for react native v62+, useNativeDriver is a required value. I saw this in particular for onPressIn and onPressOut for the Button component.

image

Motivation

getting rid of yellow box errors on day one when 62 comes out fully

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Trancevercommented, Apr 10, 2020

Fixed in v3.8

1reaction
hakimhassani97commented, Apr 2, 2020

hi @ryanmagoon , i faced the same problem as you
i’m on
"react-native": "0.62.0", "react-native-paper": "^3.6.0",

for me the problem was on Button with mode='contained' so my work around was to :

  • remove the mode prop
  • use a custom style style={{backgroundColor:Theme.primary, elevation:7, border:0}}
  • set text color, which changes the ripple effect’s color color={Theme.light} and now the Button animations work without warnings 😃
Read more comments on GitHub >

github_iconTop Results From Across the Web

Animated: `useNativeDriver` was not specified. This is a ...
Specifically, > 0.62 where specifying useNativeDriver is required. I'm guessing this is the offending Animated.timing call from the library.
Read more >
Animated - React Native
You can use the native driver by specifying useNativeDriver: true in your animation configuration. See the Animations guide to learn more.
Read more >
react-native-reanimated - npm
Latest version : 2.13.0, last published: a month ago. ... UI thread with useNativeDriver flag, we still had to call back into JS...
Read more >
How Animations Work in React Native - freeCodeCamp
The Animated API. React Native exposes an API called Animated. It consists of a lot of wonderful things like animatable values, spring/timing ......
Read more >
Optimizing React Native performance - LogRocket Blog
Solve your React Native app performance issues, like console statements and animations, using these optimization tools.
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