Installation¶
npm¶
yarn¶
pnpm¶
React dependency¶
| Package | Range |
|---|---|
react |
^18.2.0 \|\| ^19.0.0 |
react-dom |
^18.2.0 \|\| ^19.0.0 |
Even if you only use mountBrowser() and never write a line of React yourself, you must install react / react-dom — the ESM build of @rbrowser/main (what npm consumers get) treats React as external. The example repo's package.json lists them under dependencies for exactly this reason.