Skip to content

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.

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.

The build-android target is removed because it matches the inferred target. The bundle-android target keeps its executor.

apps/demo/project.json
{
"name": "demo",
"targets": {
"build-android": {
"executor": "@nx/react-native:build-android",
"options": {}
},
"bundle-android": {
"executor": "@nx/react-native:bundle",
"options": {
"platform": "android"
}
}
}
}
apps/demo/project.json
{
"name": "demo",
"targets": {
"bundle-android": {
"executor": "@nx/react-native:bundle",
"options": {
"platform": "android"
}
}
}
}
nx.json
{
"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"
}
}
]
}

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.

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.

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.

Version: 23.0.0-beta.25

The following packages will be updated:

NameVersionAlways add to package.json
react-native~0.84.1Updated only
@react-native-community/cli~20.1.0Added if not installed
@react-native-community/cli-platform-android~20.1.0Added if not installed
@react-native-community/cli-platform-ios~20.1.0Added if not installed
@react-native/babel-preset~0.84.1Updated only
@react-native/metro-config~0.84.1Updated only
react-native-web~0.21.0Updated only
react^19.2.0Updated only
react-dom^19.2.0Updated only
react-test-renderer^19.2.0Updated only
@types/react^19.2.0Updated only
@types/react-dom^19.2.0Updated only
@testing-library/react-native~13.2.0Updated only
react-native-svg-transformer~1.5.1Updated only
react-native-svg~15.15.0Updated only
react-native-svg-web~1.0.9Updated only
@babel/runtime~7.27.6Updated only

Version: 21.4.0-beta.0

Remove deprecated dependencies from package.json

NameVersion
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

Version: 21.4.0-beta.0

The following packages will be updated:

NameVersionAlways add to package.json
react-native~0.79.3Updated only
@react-native-community/cli~18.0.0Added if not installed
@react-native-community/cli-platform-android~18.0.0Added if not installed
@react-native-community/cli-platform-ios~18.0.0Added if not installed
@react-native/babel-preset~0.79.3Updated only
@react-native/metro-config~0.79.3Updated only
react-native-web~0.20.0Updated only
react19.0.0Updated only
react-dom19.0.0Updated only
react-test-renderer~19.0.0Updated only
@types/react~19.0.10Updated only
@types/react-dom~19.0.6Updated only
@testing-library/react-native~13.2.0Updated only
react-native-svg-transformer~1.5.1Updated only
react-native-svg~15.11.2Updated only
react-native-svg-web~1.0.9Updated only
@babel/runtime~7.27.6Updated only