Technical & DevelopmentAdvanced
upgrading-react-native
Prescriptive workflows for upgrading React Native and dependencies.
Developer Setup
Setup & Installation
bash
npx skills add https://github.com/callstackincubator/agent-skills --skill upgrading-react-nativenpx skills add https://github.com/callstackincubator/agent-skills --skill upgrading-react-nativeOr paste this URL into your assistant to install:
Overview
What This Skill Does
Walks developers through downloading target template diffs, upgrading dependencies, updating React configurations, and executing verification builds.
Application
When to use this Skill
- Upgrading a legacy React Native codebase to the latest stable release.
- Resolving platform-specific configuration drift in Xcode project files or Gradle build scripts during version upgrades.
- Aligning peer dependencies and React core libraries when upgrading React Native runtime targets.
- Upgrading corresponding Expo SDK platforms in projects that combine Expo with bare native libraries.
- Executing automated build-verification routines on simulator targets post-upgrade.
Documentation
Show Skills.md file
Upgrading React Native
Overview
Covers the full React Native upgrade workflow: template diffs via Upgrade Helper, dependency updates, Expo SDK steps, and common pitfalls.
Typical Upgrade Sequence
- Route: Choose the right upgrade path via [upgrading-react-native.md][upgrading-react-native]
- Diff: Fetch the canonical template diff using Upgrade Helper via [upgrade-helper-core.md][upgrade-helper-core]
- Dependencies: Assess and update third-party packages via [upgrading-dependencies.md][upgrading-dependencies]
- React: Align React version if upgraded via [react.md][react]
- Expo (if applicable): Apply Expo SDK layer via [expo-sdk-upgrade.md][expo-sdk-upgrade]
- Verify: Run post-upgrade checks via [upgrade-verification.md][upgrade-verification]
# Quick start: detect current version and fetch diff
npm pkg get dependencies.react-native --prefix "$APP_DIR"
npm view react-native dist-tags.latest
# Example: upgrading from 0.76.9 to 0.78.2
# 1. Fetch the template diff
curl -L -f -o /tmp/rn-diff.diff \
"https://raw.githubusercontent.com/react-native-community/rn-diff-purge/diffs/diffs/0.76.9..0.78.2.diff" \
&& echo "Diff downloaded OK" || echo "ERROR: diff not found, check versions"
# 2. Review changed files
grep -n "^diff --git" /tmp/rn-diff.diff
# 3. Update package.json, apply native changes, then install + rebuild
npm install --prefix "$APP_DIR"
cd "$APP_DIR/ios" && pod install
# 4. Validate: both platforms must build successfully
npx react-native build-android --mode debug --no-packager
xcodebuild -workspace "$APP_DIR/ios/App.xcworkspace" -scheme App -sdk iphonesimulator build
Lines 1 - 34 of 73
Recommendations