Rendering Browser-Only Components with React's browser() API
In React apps with SSR, reading localStorage has meant managing the first render with useEffect and state. The browser() API lets you express browser-only rendering with use(browser()) and hand the pending UI to Suspense. Here is how it works.











