Upgrade the React Native fixture app to a new version. Covers JS deps, Android (Gradle, Kotlin, SDK), iOS (Podfile, pbxproj), Metro config, and third-party libraries.
The fixture app lives in fixture/react-native/. It is the primary test vehicle for FlashList on iOS and Android. The web fixture (fixture/web/) uses Expo and is independent — check it builds after the upgrade but it does not need the same dependency changes.
Check the latest stable RN version:
npm view react-native@latest version
Use the rn-diff-purge repo to see the exact template diff between your current and target version:
https://raw.githubusercontent.com/react-native-community/rn-diff-purge/release/<version>/RnDiffApp/<file>
Key files to fetch:
package.json — React version, CLI versions, dev dep versionsandroid/build.gradle — SDK versions, Kotlin versionandroid/app/build.gradle — plugin names, dependency patternsandroid/gradle.properties — feature flags (newArch, hermes, edgeToEdge)android/gradle/wrapper/gradle-wrapper.properties — Gradle versionandroid/settings.gradle — plugin management patternandroid/app/src/main/java/com/rndiffapp/MainApplication.kt — app initialization patternios/Podfile — pod configuration, post_install hooksios/RnDiffApp/AppDelegate.swift — app delegate patternmetro.config.js — Metro config API changesCheck third-party library compatibility with the target RN version:
react-native-reanimated — check compatibility tablereact-native-gesture-handler — supports 3 latest RN minorsreact-native-screens, react-native-safe-area-context — usually latest works@react-navigation/* — check for breaking changes@d11/react-native-fast-image, etc.)fixture/react-native/package.jsonUpdate in this order:
react and react-native — match the template@react-native/* dev packages — must match the RN minor (e.g., @react-native/[email protected] for RN 0.84.1)@react-native-community/cli* — match the templatereact-native-worklets)Check if any Babel plugins moved packages. Example: reanimated 4 moved react-native-reanimated/plugin to react-native-worklets/plugin.
Metro's internal module paths change between versions. Common breakage:
metro-config/src/defaults/exclusionList — in newer Metro this moved to metro-config/private/defaults/exclusionList and exports a .default instead of a direct functionnode -e "console.log(typeof require('<path>'))"android/build.gradlebuildToolsVersion, compileSdkVersion, targetSdkVersion — match templatekotlinVersion — match templatendkVersion — match template (usually unchanged between minors)android/gradle/wrapper/gradle-wrapper.propertiesandroid/gradle.propertiesandroid.enableJetifier, FLIPPER_VERSION)edgeToEdgeEnabled)android/app/build.gradlekotlin-android → org.jetbrains.kotlin.android)import com.android.build.OutputFile)autolinkLibrariesWithApp() is presentandroid/settings.gradleMainApplication.ktAppPackage() registration and I18nUtil.allowRTL() for RTL support.SoLoader.init() + DefaultNewArchitectureEntryPoint.load() + ReactNativeHostloadReactNative(this) + getDefaultReactHost() with lazy delegate (no ReactNativeHost)ios/PodfileENV['RCT_NEW_ARCH_ENABLED'] when new arch is the default)get_default_flags())use_frameworks! :linkage => :static if needed)ios/FlatListPro.xcodeproj/project.pbxprojIPHONEOS_DEPLOYMENT_TARGET to match the RN minimum (e.g., 15.1 for RN 0.76+)ios/FlatListPro/Info.plistRCTNewArchEnabled)cd fixture/react-native
rm -rf node_modules yarn.lock
yarn install
cd ios && rm -rf Pods Podfile.lock && pod install && cd ..
yarn build # from repo root — compiles src/ → dist/
cd fixture/react-native
xcodebuild -workspace ios/FlatListPro.xcworkspace -scheme FlatListPro \
-configuration Debug -sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 16 Pro' build
cd fixture/react-native
yarn react-native run-android
cd fixture/web && yarn install && npx expo export --platform web
yarn test # from repo root — 181+ tests must pass
cd fixture/react-native
yarn e2e:build:ios
yarn e2e:test:ios
Screenshot reference updates: Visual diff tests (e.g., Carousel orientation) will fail after an RN upgrade because rendering changes slightly. To regenerate references:
e2e/artifacts/ios/Carousel_landscape/)exclusionList import — Metro's internal API paths change between versions. Always verify the import resolves before starting Metro.react-native-reanimated major version — Major bumps (3→4) require Babel plugin changes and may add new peer dependencies (react-native-worklets).IPHONEOS_DEPLOYMENT_TARGET — Must match or exceed the RN minimum. Pod install updates most settings, but the project-level target in pbxproj must be set manually.Info.plist new keys — Some RN versions require new plist entries (e.g., RCTNewArchEnabled). Check the template's Info.plist diff.