Skip to content

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

Closed

Description

@Naturalclar

Overview

#939 removed the expo 46 web tooling (expo, @expo/webpack-config, babel-preset-expo, react-dom 17, react-native-web 0.14, app.config.js and the web script), because it couldn't run on React 19. Since then there has been no way to run the example on web, even though the README badge advertises android | ios | web, and the library ships a JS implementation (js/SegmentedControl.js) used on Android and web.

#940 rebuilt the native example (Android/iOS) on React Native 0.88.1 with react-native-test-app, which doesn't support web.

Proposal

Add a separate workspace package, example-web/, that runs the shared example/App.js on web with Expo SDK 58:

  • Expo SDK 58 is built for exactly the versions the repo now uses: react-native 0.88.1, react / react-dom 19.3.0, react-native-web ~0.21.4.
  • It bundles with Metro, like the native example, and babel-preset-expo strips Flow, so the library's untranspiled js/ sources work as they are.
  • It's a separate package rather than adding expo to example/, because putting expo in example/ would autolink Expo modules into the react-native-test-app Android/iOS builds.

Scope:

  • example-web/package.json with expo, react-dom, react-native-web, @expo/metro-runtime, and the library via workspace:*
  • An entry that registers ../example/App with registerRootComponent
  • A Metro config that watches the repo root and resolves the library from it (the same approach as example/metro.config.js)
  • Root scripts: pnpm web (dev server) and a static export (expo export --platform web) for CI
  • CI: a web job in the Example apps workflow that runs the static export

Alternative considered: Vite with react-native-web. It's lighter, but the library ships Flow-typed sources, so it would need extra Flow-stripping setup. Expo matches what the example used before.

Acceptance criteria

  • pnpm web serves the example in a browser, and the segmented controls render and switch.
  • expo export --platform web succeeds in CI.
  • The Android/iOS example builds are unaffected (no Expo modules autolinked into them).
  • The Expo web example doesn't reintroduce any open Dependabot alerts.

Activity

  1. added a commit that references this issue on Nov 22, 2026
    f81e9fe
  2. added a commit that references this issue on Nov 22, 2026
    5a9cc21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions