Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run the page on @rootnative/web
The
devhub uipage now runs on@rootnative/webin place ofreact-native-web. The page source doesn't change.
What changed
apps/web/package.json:react-native-webis now a package alias of@rootnative/web-expo@0.0.0-alpha.5. Expo and Metro still ask forreact-native-web, and they get the new runtime.pnpm-lock.yaml: the new packages.The first commit used
0.0.0-alpha.4. The second commit moves to0.0.0-alpha.5, which makes each render after the first one cheaper.Why
@rootnative/webrenders React Native components as plain DOM elements: anative
button,h1toh3, and aspanfor text. The page is its firstreal app.
On the same page, with production exports of both runtimes (Chromium, CPU
throttled 4x, medians of 10 runs):
@rootnative/webalpha.5Layout is the one measure where the new runtime is slower. The cause isn't
known yet, and it's under 1 % of the load.
How I checked it
each menu and dialog, three widths, light and dark, and the desktop host
mode. All pass. Against the same walk on react-native-web, no text or
control moved, and the screenshots are the same.
apps/webpass.store: the load, the Devices and Setup pages, and the Settings dialog with
Escape. No console warning or error. The window drag region works.
Validateand the tests on macOS and Windows pass, with theproduction export of the page.
Not checked: the packaged desktop app from the
Desktop packageworkflow,and the look of the window by eye.
What you'll see in the lockfile
react-native-web@0.21.4stays as an optional entry. pnpm installs it asthe peer of the
expoinexample/. The page doesn't load it.@react-native/normalize-colors0.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
Put
"react-native-web": "~0.21.4"back inapps/web/package.json, and runpnpm install.