React Native, as a real web app.
A standalone web runtime for React Native apps. You write react-native. The browser gets semantic HTML, atomic CSS, server rendering, and SEO tags.
- React 19
- TypeScript
- ESM only
- MIT
<View role="main" style={{ padding: 16 }}>
<Text role="heading" aria-level={1}>
Hello from React Native
</Text>
<Text href="/about">About</Text>
</View>
<style data-precedence="rootnative-reset">…</style>
<style data-precedence="rootnative-shorthand">.rn-hst5or{padding:16px}</style>
<main class="rn-view rn-hst5or">
<h1 class="rn-text">Hello from React Native</h1>
<a href="/about" class="rn-text">About</a>
</main>
What does a React Native app need to be a good web app?
Parity first
Every react-native export that ships behaves as it does on iOS and Android.
Semantic HTML
The role prop picks the element. A View with role="main" is a <main>, and href makes an <a>.
Atomic CSS
Each style declaration becomes one CSS class, and every element with the same declaration shares it.
Server rendering
Render the page on the server, and React puts the CSS of each component in it. Then hydrate it in the browser.
SEO tags
Set the title, the meta tags, Open Graph, and JSON-LD of each page with Head.
Tested in a real browser
Every component and API has tests that run in Chromium, not in a simulated DOM.
One import. Three layers.
Your app imports react-native. On Metro, @rootnative/web-expo or @rootnative/web-metro resolves that name to @rootnative/web. On Vite, the plugin does it. Import the web entry only in code that runs on the web. A server render needs nothing from this package.
Parity
@rootnative/webThe React Native components and APIs.
Web
@rootnative/web/domBrowser features that native doesn't have, for example <Head>.
Server
react-dom/serverReact's own renderer. Each component sends its CSS with its HTML.
Point react-native at the package.
In an Expo app or a React Native CLI app, wrap your Metro config with withRootNative. In a Vite app, add the Vite plugin. The rest of your app stays the same code that runs on iOS and Android.
const { getDefaultConfig } = require('expo/metro-config')
const { withRootNative } =
require('@rootnative/web-expo/metro.cjs')
module.exports = withRootNative(getDefaultConfig(__dirname))
Your React Native code, in the browser.
The Status page lists what ships today and what's planned.