Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

React Native warning: Animated useNativeDriver was not specified

ErrorAnimated: `useNativeDriver` was not specified

Short answer

The Animated API lists useNativeDriver as a required option, so set it explicitly in every animation config. Add useNativeDriver: true for opacity and transform animations, and false for anything that changes layout such as width or height. One animated value can use only one driver, so every animation on it must agree.

  • Applies to React Native 0.7x-0.8x, Expo SDK 54
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Find every Animated call that starts an animation; each needs the option.

    grep -rn "Animated\.\(timing\|spring\|decay\|event\)" src app App.tsx 2>/dev/null
  2. 2Match what you see, then jump to its fix

    1. 1The warning names useNativeDriver and your Animated.timing, spring or event call has no such keyThe option is missing from the animation configFix
    2. 2Setting true makes it fail, or the animated style uses width, height, top or flexThe animation changes layout propertiesFix
    3. 3One animation uses true and another animation on the same Animated.Value uses falseTwo animations on one value disagree about the driverFix

What does the error look like?

  • Animated: `useNativeDriver` was not specified

Cause 1 of 3

The option is missing from the animation config

1Check

React Native docs say animations without it default to false for legacy reasons, but they emit a warning and a TypeScript type error, so set it explicitly.

grep -rn -A4 "Animated.timing" src app 2>/dev/null

2Fix

Add the option. Use true for non-layout properties such as transform and opacity.

Animated.timing(fade, {
  toValue: 1,
  duration: 500,
  useNativeDriver: true,
}).start();

3Verify

Reload the app; the warning no longer appears for that animation.

npx react-native start --reset-cache

Confirmed by reactnative.dev

Did this fix it?

Cause 2 of 3

The animation changes layout properties

1Check

The native driver supports non-layout properties such as transform and opacity. Flexbox and position properties are not supported.

grep -rn "Animated.View" -A4 src app 2>/dev/null | grep -i "width\|height\|top\|left"

2Fix

Use false for layout animations, or rewrite them with a transform such as scale or translate so true works.

Animated.timing(size, {
  toValue: 200,
  duration: 300,
  useNativeDriver: false, // animates width
}).start();

3Verify

The animation runs and the warning is gone.

# run the screen and trigger the animation

Confirmed by reactnative.dev

Did this fix it?

Cause 3 of 3

Two animations on one value disagree about the driver

1Check

The docs say an animated value works with only one driver: if one animation on it uses the native driver, every animation on that value must also use it.

grep -rn "useNativeDriver" src app 2>/dev/null

2Fix

Pick one driver per value. Move the layout-changing animation to its own Animated.Value, or convert it to transform.

const scale = useRef(new Animated.Value(1)).current;   // native
const height = useRef(new Animated.Value(40)).current; // JS driver

3Verify

Both animations run without an error about mixing drivers.

# trigger both animations

Confirmed by reactnative.dev

Did this fix it?

How do I stop it coming back?

  • Always write useNativeDriver in every Animated config, even when it is false.
  • Prefer transform and opacity for motion so you can use the native driver.
  • Use Animated.ScrollView with Animated.event and useNativeDriver for scroll-driven effects.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.