npx skills add ...
npx skills add react-native-community/skills --skill upgrade-react-native
Use when upgrading react-native to a newer version. Handles version bumps, native project changes (Android/iOS), dependency updates, and breaking change migration. Invoke with `/upgrade-react-native <version>`.
npx skills add react-native-community/skills --skill upgrade-react-native
Upgrade a React Native Community CLI project to a target version by fetching and applying the diff from the React Native Upgrade Helper.
[!Note] Expo users: For Expo projects or more complex upgrade scenarios, try:
<targetVersion> — the React Native version to upgrade to (e.g. 0.79.0).Follow every step below in order. Do not skip steps.
Read the project's root package.json and extract the react-native version
from dependencies (or devDependencies). Strip any semver range prefix
(^, ~, >=, etc.) to get the exact current version string.
If the current version cannot be determined, stop and ask the user.
0.79.0).Fetch the unified diff between the two versions:
For example, to upgrade from 0.73.0 to 0.74.0:
If the diff cannot be fetched (404), it may be because exact patch versions are
not available. Try the nearest minor versions (e.g. 0.73.0 instead of
0.73.2). Report what you tried and ask the user if needed.
The diff uses the template project name RnDiffApp. Map every path in the diff
to the actual project:
| Diff path prefix | Actual project path |
|---|---|
RnDiffApp/ | Project root (./) |
Additionally, replace occurrences of the template identifiers with the project's actual names:
| Template value | Replace with |
|---|---|
RnDiffApp | The project's app name (from app.json → name, or the name field in package.json) |
rndiffapp | Lowercase version of the project's app name |
com.rndiffapp | The project's Android package name (from android/app/build.gradle or android/app/src/main/AndroidManifest.xml) |
Before making any edits, review the entire diff and categorize changes:
- lines. These can be applied as-is.Present this plan to the user before proceeding. Group changes by area:
package.json, metro.config.js, .eslintrc.js, etc.)ios/ directory)android/ directory)Apply the changes following the plan from step 5:
+ lines.Important considerations:
package.json, update the react-native version and any
related dependencies mentioned in the diff (e.g. react, @react-native/*
packages, Gradle versions, CocoaPods versions).npm install / yarn install / pod install automatically.
Inform the user these steps are needed after the upgrade.Scan the project's dependencies and devDependencies in package.json for
third-party React Native libraries that contain native code (i.e. they have
an ios/ or android/ directory, or are known native modules). Common examples
include react-native-screens, react-native-reanimated,
react-native-gesture-handler, @react-native-async-storage/async-storage,
react-native-svg, react-native-safe-area-context, etc.
For each candidate dependency:
Present all proposed dependency bumps alongside the diff-based changes in step 5 (grouped under a Third-party native dependencies section). For each:
Apply these version bumps to package.json as part of step 6.
React Native 0.87 makes the Strict TypeScript API the default. When the upgrade crosses this boundary (current version < 0.87, target >= 0.87) and the project uses TypeScript (a tsconfig.json exists), type-checking of the project is affected and this step is required — do not silently skip it.
Ask the user which they prefer:
migrate-to-strict-api skill (/migrate-to-strict-api), which handles dependency compatibility, deep import rewriting, and known breaking type changes."customConditions": ["react-native", "react-native-legacy-deep-imports"] to compilerOptions in tsconfig.json, keeping both entries. Tell the user this opt-out is temporary and due for removal in a future release.For target versions below 0.87, or projects without TypeScript, skip this step and do not suggest the migration unprompted.
After applying all changes, present the user with a checklist:
npm install or yarn install to update JS dependenciescd ios && bundle exec pod install (or npx pod-install) to update
native iOS dependenciescd android && ./gradlew cleancd ios && xcodebuild cleannpx tsc --noEmit to confirm the Strict TypeScript API migration or opt-out from step 8Consult these for version-specific migration guidance: