@nx/react-native - Migrations
For an overview of the plugin and setup instructions, see the @nx/react-native introduction.
The @nx/react-native plugin provides various migrations to help you migrate to newer versions of react-native projects within your Nx workspace. Below is a complete reference for all available migrations.
24.0.x
Section titled “24.0.x”remove-deprecated-executors
Section titled “remove-deprecated-executors”Version: 24.0.0-beta.3
Converts targets using the removed @nx/react-native executors to inferred tasks; an AI prompt finishes the targets the converter cannot convert safely and validates the project graph.
Convert @nx/react-native targets to inferred tasks
Section titled “Convert @nx/react-native targets to inferred tasks”Nx 24 removes the @nx/react-native:build-android, @nx/react-native:build-ios, @nx/react-native:bundle, @nx/react-native:pod-install, @nx/react-native:run-android, @nx/react-native:run-ios, @nx/react-native:start and @nx/react-native:upgrade executors and their @nrwl aliases. The migration registers @nx/react-native/plugin in nx.json and converts the targets that use those executors to inferred tasks. Executor options become command-line arguments of the inferred tasks. The converter does not handle bundle targets, so they are left for manual conversion. A target with nothing left to override is removed from project configuration. When several projects share the same remaining options, those options move to a targetDefaults entry scoped to the plugin. targetDefaults entries keyed by a removed executor are removed once no target uses that executor.
The migration lists the targets the converter cannot convert safely. In agentic runs, an AI prompt finishes them and validates the project graph.
The @nx/react-native:storybook, @nx/react-native:sync-deps and @nx/react-native:ensure-symlink executors stay.
Sample code changes
Section titled “Sample code changes”The build-android target is removed because it matches the inferred target. The bundle-android target keeps its executor.
Before
Section titled “Before”{ "name": "demo", "targets": { "build-android": { "executor": "@nx/react-native:build-android", "options": {} }, "bundle-android": { "executor": "@nx/react-native:bundle", "options": { "platform": "android" } } }}{ "name": "demo", "targets": { "bundle-android": { "executor": "@nx/react-native:bundle", "options": { "platform": "android" } } }}{ "plugins": [ { "plugin": "@nx/react-native/plugin", "options": { "buildAndroidTargetName": "build-android", "buildIosTargetName": "build-ios", "bundleTargetName": "bundle", "podInstallTargetName": "pod-install", "runAndroidTargetName": "run-android", "runIosTargetName": "run-ios", "startTargetName": "start", "syncDepsTargetName": "sync-deps", "upgradeTargetName": "upgrade" } } ]}23.0.x
Section titled “23.0.x”update-23-0-0-migrate-create-nodes-v2-import
Section titled “update-23-0-0-migrate-create-nodes-v2-import”Version: 23.0.0-beta.24
Rename imports of createNodesV2 from @nx/react-native/plugin to the canonical createNodes export.
Rename createNodesV2 imports to createNodes
Section titled “Rename createNodesV2 imports to createNodes”@nx/react-native renamed its primary inferred-plugin export from createNodesV2 to createNodes. The createNodesV2 name is preserved as a deprecated alias for now, but new code should use createNodes.
This migration scans every .ts, .tsx, .cts, and .mts file in your workspace and rewrites named imports and re-exports of createNodesV2 from @nx/react-native/plugin to createNodes.
Sample Code Changes
Section titled “Sample Code Changes”Before
Section titled “Before”import { createNodesV2 } from '@nx/react-native/plugin';import { createNodes } from '@nx/react-native/plugin';Aliases are preserved (createNodesV2 as cn becomes createNodes as cn), and if a file already imports both names ({ createNodes, createNodesV2 }) the redundant binding is dropped.
What is not rewritten
Section titled “What is not rewritten”Only static import/export named bindings from @nx/react-native/plugin are rewritten. Namespace imports, dynamic import(...), require(...) destructuring, and property access such as plugin.createNodesV2 are left untouched — they keep working through the createNodesV2 runtime alias. Update those by hand if you want to drop the deprecated name everywhere.
23.0.0-package-updates
Section titled “23.0.0-package-updates”Version: 23.0.0-beta.25
Packages
Section titled “Packages”The following packages will be updated:
| Name | Version | Always add to package.json |
|---|---|---|
react-native | ~0.84.1 | Updated only |
@react-native-community/cli | ~20.1.0 | Added if not installed |
@react-native-community/cli-platform-android | ~20.1.0 | Added if not installed |
@react-native-community/cli-platform-ios | ~20.1.0 | Added if not installed |
@react-native/babel-preset | ~0.84.1 | Updated only |
@react-native/metro-config | ~0.84.1 | Updated only |
react-native-web | ~0.21.0 | Updated only |
react | ^19.2.0 | Updated only |
react-dom | ^19.2.0 | Updated only |
react-test-renderer | ^19.2.0 | Updated only |
@types/react | ^19.2.0 | Updated only |
@types/react-dom | ^19.2.0 | Updated only |
@testing-library/react-native | ~13.2.0 | Updated only |
react-native-svg-transformer | ~1.5.1 | Updated only |
react-native-svg | ~15.15.0 | Updated only |
react-native-svg-web | ~1.0.9 | Updated only |
@babel/runtime | ~7.27.6 | Updated only |
21.4.x
Section titled “21.4.x”update-21-4-0-remove-deprecated-deps
Section titled “update-21-4-0-remove-deprecated-deps”Version: 21.4.0-beta.0
Remove deprecated dependencies from package.json
Requires
Section titled “Requires”| Name | Version |
|---|---|
react-native | >=0.76.0 <0.79.0 |
update-21-4-0-upgrade-react-native-projects
Section titled “update-21-4-0-upgrade-react-native-projects”Version: 21.4.0-beta.0
Run nx upgrade for each React Native project
21.4.0-package-updates
Section titled “21.4.0-package-updates”Version: 21.4.0-beta.0
Packages
Section titled “Packages”The following packages will be updated:
| Name | Version | Always add to package.json |
|---|---|---|
react-native | ~0.79.3 | Updated only |
@react-native-community/cli | ~18.0.0 | Added if not installed |
@react-native-community/cli-platform-android | ~18.0.0 | Added if not installed |
@react-native-community/cli-platform-ios | ~18.0.0 | Added if not installed |
@react-native/babel-preset | ~0.79.3 | Updated only |
@react-native/metro-config | ~0.79.3 | Updated only |
react-native-web | ~0.20.0 | Updated only |
react | 19.0.0 | Updated only |
react-dom | 19.0.0 | Updated only |
react-test-renderer | ~19.0.0 | Updated only |
@types/react | ~19.0.10 | Updated only |
@types/react-dom | ~19.0.6 | Updated only |
@testing-library/react-native | ~13.2.0 | Updated only |
react-native-svg-transformer | ~1.5.1 | Updated only |
react-native-svg | ~15.11.2 | Updated only |
react-native-svg-web | ~1.0.9 | Updated only |
@babel/runtime | ~7.27.6 | Updated only |