How to Upgrade to React Native 0.85 and Leverage the New Animation Backend
Introduction
React Native 0.85 brings a major overhaul to animation performance with a shared animation backend, along with key improvements to developer tooling and security. This guide walks you through upgrading your project, enabling the new animation backend, animating layout props with native driver, migrating the Jest preset, and optionally configuring Metro TLS. By following these steps, you'll harness the latest features while avoiding common pitfalls.
What You Need
- An existing React Native project (or a new one)
- Node.js version that is not end-of-life (v16 or later recommended; see Step 1 for details)
- React Native CLI or Expo (if using Expo, wait for SDK support)
- Basic familiarity with React Native development
- Optional: Metro bundler for TLS configuration
Step 1: Upgrade Your Project to React Native 0.85
Before you can enjoy the new features, you must upgrade your project to version 0.85. Use the React Native Upgrade Helper or run the following commands:
- Check Node.js version: Ensure you are using a supported version (Node 16+). Version 0.85 drops support for End-of-Life Node.js versions (13, 15, etc.).
- Upgrade the React Native package: Run
npx react-native upgrade 0.85.0(or replace with the latest 0.85.x patch). - Handle breaking changes:
- Jest Preset Moved: The Jest preset is now a separate package
@react-native/jest-preset. Remove the old preset reference fromjest.config.jsand install:npm install --save-dev @react-native/jest-preset. Update your config to require'@react-native/jest-preset'. - StyleSheet.absoluteFillObject Removed: Use
StyleSheet.absoluteFill(the object) instead ofabsoluteFillObject. - Other changes: Review the full changelog for any deprecations in third-party libraries.
- Jest Preset Moved: The Jest preset is now a separate package
- Test your app: Run
npx react-native run-iosandrun-androidto verify the upgrade.
Step 2: Enable the New Animation Backend (Experimental)
The new shared animation backend is experimental in 0.85.1 (released shortly after 0.85.0). To opt in:
- Ensure you are on 0.85.1 or later. Check your version:
react-native -v. - Enable the experimental channel: Follow the instructions at React Native Experimental Animation Backend. Typically, this involves setting a flag or using a specific metro config.
- Verify activation: Build and run your app. If animations work, the backend is active.
Step 3: Animate Layout Props with Native Driver
With the new backend, you can now animate Flexbox and position props (like width, height, margin, padding) using the native driver. Previously, these required JavaScript driver. Here's how:
- Use
AnimatedanduseAnimatedValue: ImportuseAnimatedValuefrom React Native. - Create an animated value:
const width = useAnimatedValue(100); - Animate with native driver: In your animation call, set
useNativeDriver: true. For example:Animated.timing(width, { toValue: 300, duration: 500, useNativeDriver: true, }).start(); - Apply to an
Animated.View: Use the animated value in style:. - Test on both platforms: Run on iOS and Android to ensure smooth native-driven layout animation.
Step 4: Migrate to the New Jest Preset Package
The Jest preset is no longer part of the main React Native package. To continue using Jest with your project:
- Install the dedicated package:
npm install --save-dev @react-native/jest-preset. - Update your Jest configuration: In
jest.config.js, replacepreset: 'react-native'withpreset: '@react-native/jest-preset'. - Remove the old preset dependency: If you had
react-native/jest-presetinstalled as a separate dependency, remove it. - Run tests:
npm testto confirm everything works.
Step 5: (Optional) Configure Metro TLS for Secure Development
Metro now accepts a TLS configuration to enable HTTPS/WSS during development. This is useful for testing secure features locally.
- Create or modify
metro.config.js: Add atlsproperty to the config: - Place certificates: Obtain or generate valid TLS certificates.
- Start Metro with HTTPS: Run
npx react-native start --port 8081 --sslor your custom script. - Update your app: Ensure your app connects to
https://localhost:8081for the dev server.
module.exports = {
tls: {
cert: './path/to/cert.pem',
key: './path/to/key.pem',
},
};
Step 6: Take Advantage of DevTools Improvements
React Native 0.85 enhances DevTools with multiple CDP connections and native macOS tabs.
- Multiple CDP connections: Now you can connect DevTools, VS Code, and AI agents simultaneously. No more session conflicts.
- Request payload previews on Android: Network panel now shows request bodies again.
- Native tabs on macOS: If you have multiple DevTools windows, use Window > Merge All Windows to group them into tabs.
To use these features, simply open DevTools as usual (Ctrl+Shift+D or from the developer menu). No extra configuration needed.
Tips for a Smooth Upgrade
- Back up your project before starting the upgrade.
- Test all animations after enabling the new backend; some third-party animation libraries may need updates.
- Jest preset migration: If you have custom jest mock files that rely on the old preset path, update them to use the new package.
- Node.js version: Use Node 18 or 20 for best compatibility.
- Metro TLS: Only configure if you need HTTPS locally – it's not required for most development.
- Check the changelog for any other breaking changes that may affect your project.
Related Articles
- U.S. Taps Strategic Oil Reserves: 17.5 Million Barrels Released in Response to Market Pressures
- How to Interpret the Global Electric Vehicle Sales Report for March 2026
- Solar Industry Surges Forward: 4 GW of New Capacity Headed for the US Grid
- Decoding Tesla's 10 Billion FSD Mile Milestone: A Practical Guide to Autonomy Progress
- 10 Critical Insights into Australia’s Green Iron Race Against Time
- Tesla Introduces Most Affordable Model 3 Yet in Canada, Powered by Chinese Imports
- ESS to Mass-Produce Alsym's Sodium-Ion Battery: A Breakthrough for Grid Storage
- Streamlining Carbon Footprint Management: A Guide to AWS Sustainability Console