docs: document React browser API (#97621)
### What? - Documents React Canary's new `browser` API in the SPA guide - Adds examples for marking a Client Component as browser-only and wrapping it in Suspense ### Why? The App Router includes React Canary releases, and the `browser` API now provides a Suspense-based option for components that depend on browser APIs such as `window` or `document`. ### How? The guide calls `browser()` inside `use()` in a Client Component. It then wraps that component in Suspense so prerendering can show the closest fallback before the component renders in the browser. ### Testing - `prettier --check docs/01-app/02-guides/single-page-applications.mdx` - `alex docs/01-app/02-guides/single-page-applications.mdx --quiet` (only existing SPA dictionary warnings)
Showing
Please
register
or
sign in
to comment