· Tested React Native versions
Render React DOM components inside React Native with the 'use dom' directive, without Expo.
A module marked 'use dom' runs in a native web view on iOS and Android, and native code renders it like any
other component: props go in, function props become native actions the component can await, and methods it
exposes are reachable through a ref. Release builds embed every page, so components load offline.
Function props, ref methods and props cross the bridge in both directions · Fast Refresh keeps the component's state
- Use it: the package README, then the guide.
- Errors: docs/errors.md explains every
ERR_USE_DOM_*code. - Coding agents:
AGENTS.mdhas the rules in one page.
| Path | What it holds |
|---|---|
packages/react-native-use-dom |
the library: Babel plugin, Metro integration, runtimes, native view |
examples/bare-0.87 |
a React Native Community CLI app, without Expo |
examples/expo-57 |
an Expo app with a development build |
examples/bare-* |
the same app on the other React Native versions the tests cover |
docs |
the user guide |
From a clean checkout, with Node.js 22.12 or newer:
corepack enable # provides the pnpm version in package.json's packageManager
pnpm install
pnpm exec lefthook install
pnpm buildRun the checks CI runs. zizmor audits the workflows:
pnpm lint
pnpm format:check
pnpm typecheck
pnpm test
zizmor .githubThe tests need no simulator or device: they run Metro, Babel and both runtimes in-process.
Run the example apps on a simulator or device, which needs the React Native environment for each platform. Each README has the steps, for development and release builds:
The examples use the library from the workspace, through its build: run pnpm build again after changing it.
CONTRIBUTING.md covers the git hooks, commit messages, type tests and generated docs.

