Skip to content

How to Use React 19.3’s Browser API for SSR

React 19.3 adds the browser() API for server-rendered apps. Learn how to isolate browser-only components, use Suspense correctly, and avoid unnecessary client-only rendering.

How to Use React 19.3’s Browser API for SSR

On this page

React 19.3, released on September 9, 2026, adds a new browser API for components that cannot produce meaningful HTML during server-side rendering. Instead of checking typeof window or waiting for an effect to run after hydration, you can explicitly tell React to render a component only in the browser and let a Suspense fallback handle the server output.

This is useful for web applications that read localStorage, inspect the user's time zone, use browser-only APIs, or depend on client-side data that does not exist on the server. The important detail is that browser() does not make the entire application client-only; it isolates the part that genuinely needs the browser.

What React 19.3 changes for browser-only components

Server-side rendering (SSR) produces HTML on the server before the page reaches the browser, while hydration connects that HTML to React in the browser. Previously, developers commonly handled browser-only components with a mounted state, an effect, or a typeof window !== 'undefined' check. Those techniques can work, but they make the component responsible for managing its own transition from server output to browser output.

React 19.3 introduces browser() in react-dom as a first-class way to opt a subtree out of server rendering. When React encounters use(browser()) during server rendering, the component suspends and the nearest Suspense boundary supplies its fallback. After hydration in the browser, use(browser()) resolves normally and the component can use browser APIs.

Update the project to React 19.3 first

Before using the API, make sure the application is actually running React 19.3. The stable react package is version 19.3.0, and the React team's release notes identify browser() as one of the new React DOM features in that release.

In a project managed directly with npm, update both React packages together:

npm install react@19.3.0 react-dom@19.3.0

Then verify the installed versions:

npm list react react-dom

The result should show version 19.3.0 for the packages you are using. If a framework controls React versions for your project, follow that framework's supported upgrade path instead of forcing a package version that it does not support.

Identify code that truly needs the browser

The new API is not a replacement for normal React rendering. Use it when a component genuinely depends on something unavailable during server rendering. Common examples include localStorage, browser time-zone detection through Intl.DateTimeFormat, media queries that must be evaluated in the browser, or browser-specific APIs exposed through window and navigator.

For example, this component cannot safely read localStorage while the server is rendering because localStorage belongs to the browser environment:

function SavedDraft() {
  const draft = localStorage.getItem('draft');

return 

Saved draft: {draft}

; }

Putting the component behind a client-only condition can avoid the server error, but it also leaves the application to decide how the server should represent that missing content. React 19.3 gives that responsibility to the rendering model instead.

Wrap the browser-only component in Suspense

The next step is to add a Suspense boundary. Suspense is React's mechanism for displaying fallback content while a component is not ready to render. With browser(), that same mechanism represents the period when the server cannot render the component but the browser eventually can.

Here is the complete pattern:

import { Suspense, use, useState } from 'react';
import { browser } from 'react-dom';

function SavedDraft() {
use(browser('The draft requires browser storage.'));

const [draft, setDraft] = useState(
() => localStorage.getItem('draft') ?? ''
);

function handleChange(event) {
const nextDraft = event.target.value;

```
setDraft(nextDraft);
localStorage.setItem('draft', nextDraft);
```

}

return (