Skip to content

feat: run the page on @rootnative/web - #1

Merged
raajnadar merged 8 commits into
mainfrom
feat/web-runtime-beta
Nov 28, 2026
Merged

raajnadar merged 8 commits into
mainfrom
feat/web-runtime-beta

Conversation

@raajnadar

@raajnadar raajnadar commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Run the page on @rootnative/web

The devhub ui page now runs on @rootnative/web in place of
react-native-web. The page source doesn't change.

What changed

  • apps/web/package.json: the page depends on @rootnative/web-expo
    0.0.10. The react-native-web dependency is gone.
  • apps/web/metro.config.js: the config ends with withRootNative(config).
    On the web, this helper sends each react-native and react-native-web
    import to the new runtime. It works with the nodeModulesPaths and
    disableHierarchicalLookup settings of the page.
  • pnpm-lock.yaml: the new packages, and no react-native-web.
  • Three comments said "react-native-web". They now say "the web runtime".

The first commits used a package alias, from 0.0.0-alpha.4 to
0.0.0-alpha.7. The 0.0.8 commit removed the alias. The last two commits
move to 0.0.9 and 0.0.10.

Why

@rootnative/web renders React Native components as plain DOM elements: a
native button, h1 to h3, and a span for text. The page is its first
real app.

On the same page, with production exports of both runtimes (Chromium, CPU
throttled 4x, medians of 10 runs):

Measure react-native-web 0.21.4 @rootnative/web 0.0.10 Change
JavaScript, gzip 401,874 B 388,680 B −3 %
LCP 1,640 ms 1,456 ms −11 %
Total blocking time 302 ms 237 ms −22 %
Script time on the load 1,450 ms 1,242 ms −14 %
Project menu, open 74 ms 55 ms −26 %
Settings dialog, open 249 ms 183 ms −27 %
JS heap after the load 10.76 MB 10.21 MB −5 %
Layout time on the load 89 ms 90 ms the same, in the noise

The JavaScript gain was −7 % on 0.0.0-alpha.5. 0.0.8 added a
VirtualizedList. The page has no list, but Reanimated's Animated imports
FlatList, so the list code is in the bundle.

0.0.10 adds 578 B gzip to 0.0.9. In a run of the two side by side, each
timing is the same.

How I checked it

On 0.0.10:

  • Page walk: 28 steps in headless Chromium with a fake API: each screen,
    each menu and dialog, three widths, light and dark, and the desktop host
    mode. All pass. The walk is the same as on 0.0.9. Each earlier version
    matched react-native-web: no text or control moved, and the screenshots
    are the same.
  • Console: no new warning or error.
  • Vitest: the tests of apps/web pass.
  • Desktop app: I built it from this branch. The page runs in the
    Electron host with an empty store: the load, the Devices and Setup pages,
    and the Settings dialog with Escape. No console warning or error. The
    window drag region works.
  • CI: Validate and the tests on macOS and Windows pass, with the
    production export of the page.

Not checked: the packaged desktop app from the Desktop package workflow,
and the look of the window by eye.

What you'll see in the lockfile

  • No react-native-web package. babel-plugin-react-native-web stays,
    because babel-preset-expo depends on it. It's a Babel plugin, not the
    runtime.
  • @react-native/normalize-colors 0.88.1 is nested under @rootnative/web.
    Metro can't load a nested package here, so the page uses the hoisted
    0.88.0. The page walk passes with it.

How to go back

  1. In apps/web/package.json, put "react-native-web": "~0.21.4" in place
    of "@rootnative/web-expo": "0.0.10".
  2. In apps/web/metro.config.js, remove withRootNative, and export
    config.
  3. Run pnpm install.

@raajnadar
raajnadar merged commit 516c9fa into main Nov 28, 2026
3 checks passed
@raajnadar
raajnadar deleted the feat/web-runtime-beta branch November 28, 2026 17:20
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