Skip to content

chore(example): restore the web example with Expo SDK 58 - #947

Merged
Naturalclar merged 2 commits into
masterfrom
chore/web-example
Nov 22, 2026
Merged

Naturalclar merged 2 commits into
masterfrom
chore/web-example

Conversation

@Naturalclar

@Naturalclar Naturalclar commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Overview

Closes #946.

#939 removed the expo 46 web tooling because it couldn't run on React 19, and #940 rebuilt the native example on React Native 0.88 with react-native-test-app, which doesn't support web. This PR brings the web example back.

example-web/

A new workspace package that runs the shared example/App.js on web with Expo SDK 58. SDK 58 targets exactly the versions the repo uses: react-native 0.88.1, react/react-dom 19.3.0 and react-native-web ~0.21.4.

  • Why a separate package: adding expo to example/ would autolink Expo modules into the react-native-test-app Android/iOS builds.
  • Metro: like example/metro.config.js, it watches the repository root and resolves the library from it via extraNodeModules. babel-preset-expo strips Flow, so the untranspiled js/ sources work as they are.
  • No workspace:* dependency on the library: web needs no autolinking. A second node_modules link back to the repository root (next to the one in example/) made Flow's file crawl never finish: "Lost connection to the flow server" in CI, stuck at "Parsing" locally. With it removed, flow check finishes in about 5 seconds.
  • Scripts: pnpm web at the root starts the dev server; pnpm export in example-web builds a static export.

CI

A web job in the Example apps workflow runs expo export --platform web.

Dependencies

Expo brings in minimatch 10.2.6 through @expo/fingerprint. It's covered by the same override approach as #943, so no Dependabot alert comes back.

Housekeeping

  • example/ios/.xcode.env is no longer tracked. react-native-test-app rewrites it with a machine-specific Node path on every pod install, and the example/.gitignore that configure-test-app generated already lists it. (chore(example): upgrade the example app to React Native 0.88 #940 committed a portable value, but it gets overwritten locally on each pod install.)
  • Ignored: example/android/.kotlin/ (Gradle 9), example-web/dist, and .expo. The last two are also added to .eslintignore and .flowconfig.

Test Plan

Run locally:

  • Static export: expo export --platform web with the cache cleared bundles 266 modules into dist/.
  • Rendering: I served dist/ and opened it in headless Chrome. All example sections render (segments, pre-selected, momentary, disabled, custom colours, images, font sizes), and I checked a screenshot.
  • Interaction: clicking the second segment of the "Value / Index" control through Chrome DevTools changes the label from Value: Unselected Index: to Value: Two Index: 1.
  • Native example unaffected: with Expo installed in the workspace, the Android assembleDebug succeeds. pod install installs the same 90 pods with Podfile.lock unchanged, so no Expo modules get autolinked. (react-native-test-app does notice @expo/config-plugins, but the example's app.json has no plugins.)
  • Audit: pnpm audit shows no minimatch findings. The only remaining finding is a new moderate glob advisory (GHSA, >=9.0.0 <=14.0.1) on jest's glob@10/glob@13. It's already present on master and will be handled separately.
  • Checks: pnpm install --frozen-lockfile, Jest (9 passed), pnpm lint (0 errors) and pnpm tsc pass.
  • Flow: flow check passes in about 5 seconds. The first push failed in CI because of the symlink cycle described above, now fixed.

🤖 Generated with Claude Code

Naturalclar and others added 2 commits November 22, 2026 16:26
Add an example-web workspace package that runs the shared
example/App.js on web with Expo SDK 58, which targets exactly
react-native 0.88.1, react/react-dom 19.3.0 and react-native-web 0.21.
It is a separate package so that Expo modules are not autolinked into
the react-native-test-app Android/iOS builds.

- Metro watches the repository root and resolves the library from it
- `pnpm web` starts the dev server; CI runs `expo export --platform web`
  in a new `web` job of the Example apps workflow
- Override minimatch for @expo/fingerprint (same as #943)
- Stop tracking example/ios/.xcode.env: react-native-test-app rewrites
  it with a machine-specific Node path on every `pod install`, and the
  generated example/.gitignore already ignores it
- Ignore example/android/.kotlin and the web build output

Closes #946

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e link

The `workspace:*` dependency linked
example-web/node_modules/@react-native-segmented-control/segmented-control
back to the repository root. Together with the same link in example/,
that made Flow's file crawl never finish ("Lost connection to the flow
server" in CI; stuck at "Parsing" locally). The web example doesn't need
autolinking, and Metro already resolves the library from the root via
extraNodeModules, so drop the dependency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Restore the web example on React Native 0.88 (Expo SDK 58)

1 participant