Skip to content

chore(example): upgrade the example app to React Native 0.88 - #940

Merged
Naturalclar merged 4 commits into
masterfrom
chore/upgrade-example
Nov 22, 2026
Merged

Naturalclar merged 4 commits into
masterfrom
chore/upgrade-example

Conversation

@Naturalclar

@Naturalclar Naturalclar commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Overview

The second of the React Native 0.88 upgrade PRs. It follows #939, which upgraded the root tooling and is now merged.

This rebuilds the example app on React 19.3 / React Native 0.88.1 for Android and iOS. Web will follow in a separate PR.

Example app

  • Versions: react-native-test-app 5.4 (was 1.4.6) and @react-native-community/cli 20.2. The native projects were regenerated with test-app's configure-test-app -p android -p ios: Gradle 9.4.1 on Android, and Hermes with the New Architecture (fabric_enabled) on iOS.
  • macOS and Windows removed: the projects and the react-native-macos/react-native-windows dependencies are gone. The library only advertises Android, iOS and web (README badge, podspec platforms), and test-app 5 caps macOS at RN 0.81.
  • The library is now a workspace:* dependency. The old example only imported the JS via import SegmentedControl from '..', so nothing linked the iOS native component (RNCSegmentedControl). With the dependency, autolinking finds react-native-segmented-control.podspec. react-native config lists it for iOS and, correctly, not for Android, which is JS-only.
  • Metro: the library is resolved from the repository root through extraNodeModules, and the root is added to watchFolders. Metro couldn't follow the example/node_modules symlink that points back up at the root.
  • Image fix: one require in App.js pointed at ../assets/images/user.png, a root assets/ directory that doesn't exist. It now uses ./assets/images/user.png like the other one.
  • .xcode.env: uses $(command -v node) instead of a machine-specific Node path.

Repo

  • CLI override dropped: the @react-native-community/cli 4.10.0 override in pnpm-workspace.yaml was only there for React Native 0.63 and conflicts with CLI 20.
  • Example apps CI:
    • Android now builds with JDK 17 (Gradle 9 needs it).
    • The --openssl-legacy-provider workaround is dropped.

This also fixes the android failure introduced by #939. There, the RN 0.63 example's Metro config picked up the root's React Native 0.88 metro-config through pnpm's hoisted layout (Package subpath './src/defaults/blacklist' is not defined by "exports"). Now both use the same React Native version.

Test Plan

Run locally:

  • pnpm install --frozen-lockfile, Jest (9 passed), pnpm lint (0 errors), pnpm tsc: all pass.
  • pnpm build:android and pnpm build:ios (Metro bundles) both succeed and include the 8 image assets.
  • Android: ./gradlew assembleDebug → BUILD SUCCESSFUL (JDK 17).
  • iOS: pod install completes (90 pods, including react-native-segmented-control). A simulator build with xcodebuild ... -sdk iphonesimulator build gives BUILD SUCCEEDED, compiling RNCSegmentedControl.m and RNCSegmentedControlManager.m under React Native 0.88 / New Architecture.

Not verified: running the app on a device or simulator. The iOS segmented control is an old-architecture view manager, which goes through React Native's interop layer on the New Architecture, so it's worth checking on a simulator before release. A proper Fabric component is #761's territory.

Example apps CI should now pass android. The ios job runs pod install on macos-latest.

🤖 Generated with Claude Code

Naturalclar and others added 3 commits November 20, 2026 22:28
- react 19.3.0, react-native 0.88.1, react-test-renderer 19.3.0
- @react-native/{babel,jest}-preset and @react-native/eslint-config 0.88.1
  replace metro-react-native-babel-preset, the jest "react-native"
  preset and @react-native-community/eslint-config
- flow-bin 0.331 (what React Native 0.88 uses) with a rewritten
  .flowconfig
- Drop @types/react-native (React Native ships its own types)
- Drop the expo 46 web tooling (expo, @expo/webpack-config,
  babel-preset-expo, react-dom 17, react-native-web 0.14, app.config.js);
  it cannot run on React 19 and will come back with the example upgrade

Library sources: replace React Native deep imports with public type
exports, update deprecated Flow utility types, and type the iOS
forwardRef export. Only syntax that older Babel versions parse is used,
since the sources ship untranspiled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- React 19.3 / React Native 0.88.1 with react-native-test-app 5.4 and
  @react-native-community/cli 20.2, regenerated with
  configure-test-app for Android and iOS (Gradle 9.4.1; iOS with
  Hermes and the New Architecture)
- Remove the macOS and Windows example projects and the
  react-native-macos/react-native-windows dependencies; the library
  only advertises Android, iOS and web
- Depend on the library through `workspace:*` so autolinking links the
  iOS native component (the old example only imported the JS via '..')
- Metro: resolve the library from the repository root and watch it
- Fix an image require that pointed at a non-existent root assets/ dir
- Drop the @react-native-community/cli 4.10.0 override, which was only
  needed for React Native 0.63
- CI: build Android with JDK 17 and drop the --openssl-legacy-provider
  workaround

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use `command -v node` (the React Native template default) instead of
a machine-specific Node path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Naturalclar
Naturalclar deleted the branch chore/upgrade-root-rn November 22, 2026 05:23
# Conflicts:
#	pnpm-lock.yaml
@Naturalclar Naturalclar reopened this Nov 22, 2026
@Naturalclar
Naturalclar changed the base branch from chore/upgrade-root-rn to master November 22, 2026 05:24
@Naturalclar
Naturalclar merged commit e3d671a into master Nov 22, 2026
5 checks passed
@Naturalclar
Naturalclar deleted the chore/upgrade-example branch November 22, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant