Skip to content

Rendering modes

Each page picks one of three modes from its filename.

Universal (no suffix)

The server renders the HTML, and the browser hydrates it. Use this for most pages. The page is readable without JavaScript, and interactive parts become live after the bundle loads.

text
app/pages/index.tsx

Server (.server)

The server renders the HTML. No client bundle is attached to the page, so the page ships no JavaScript. Use this for content pages, legal pages, and anything that needs no interactivity.

text
app/pages/about.server.tsx

Links from a server page are full page loads, because the client runtime is not present.

Client (.client)

The server sends an empty shell, and the browser renders the page. Use this for dashboards and pages that depend on browser-only APIs.

text
app/pages/dashboard.client.tsx

Browser-only APIs such as window, localStorage, and matchMedia are safe in client pages, because they never run on the server.

Choosing a mode

NeedMode
Fast first paint, SEO, and interactivityuniversal
Static content with no interactivityserver
Browser-only state or APIsclient