Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk5 min

Server Components Aren’t Just SSR Again: Where State Belongs in the Next.js App Router

Server Components are more than SSR. Choose state placement in the Next.js App Router by whether it is interactive, request-driven, shareable, or needed in the browser.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Server Components are not simply server-rendered versions of Client Components. In the Next.js App Router, the distinction affects which code runs in the browser, how data is fetched, and whether state should live in a component or in the URL. Put interactive, temporary state in a small Client Component; use the page’s searchParams for request-dependent data; and use URL parameters for state people should be able to share, bookmark, or revisit.

What makes a Server Component different from SSR?

Server Components are part of a composition model that divides work between server and client module graphs. They are not merely ordinary components rendered to HTML on a server. In the App Router, pages and layouts are Server Components by default. They can fetch data near its source, use secrets without exposing them to the browser, and avoid adding their own component JavaScript to the client bundle. They can also participate in streaming.

As an Amazon Associate I earn from qualifying purchases.

On the server, Next.js renders Server Components into a React Server Component (RSC) payload. That payload contains rendered Server Component output, references for Client Components and their JavaScript, and props passed across the boundary. On an initial load, the browser receives HTML as a preview, uses the RSC payload to reconcile the component trees, and hydrates Client Components. On later navigations, prefetched and cached RSC payloads support the transition, while Client Components render on the client.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

So “server-rendered” does not mean “no JavaScript reaches the browser,” and it does not mean the route is necessarily static. Client Components can be pre-rendered into initial HTML and then hydrated; they are the place for event handlers, effects, custom hooks, and browser-only APIs such as window and localStorage. As the Next.js Server and Client Components documentation puts it: “When you need interactivity or browser APIs, you can use Client Components to layer in functionality.”

How should you decide where state belongs?

Ask what the value controls, whether it is needed to fetch page data, whether it should survive a refresh or be shareable, and whether changing it requires request-time rendering. Those questions lead to different state locations:

State need Best starting point Why
Temporary interaction, such as an open menu or selected tab Client Component state It changes in response to browser events and usually does not need to be shareable.
Search, pagination, or filters that determine server-fetched results Page searchParams prop The Server Component page can use the incoming query values to fetch or render the matching result.
A choice that should survive refresh, bookmarking, sharing, or back/forward navigation URL query parameters The URL is navigable and can represent the selected state.
Query-driven behavior that only filters data already in the browser Client Component with useSearchParams The hook provides read-only access to the current query string.
Shared server-rendered shell around interactive controls Server Components composed with a narrow Client Component or provider Interactive behavior can be added without moving the whole shell into the client module graph.

Keep event-driven state in a narrow Client Component

A menu that opens on click, a tab selection that only changes a local panel, or an in-progress value in a control belongs naturally in client-side state. Add 'use client' at the entry point for that interactive feature. It marks a boundary in the module graph: imports and descendants below it become client-side code. Put the boundary close to the feature instead of marking an entire page as client-side by default.

Use the page prop when query values drive server data

When a query value determines which database-backed results, page, or search result the route should render, read the page’s searchParams prop in the Server Component and use it for the fetch or rendering decision. Accessing that prop makes rendering depend on the incoming request and opts the page into dynamic rendering. Next.js documents this behavior in its page convention reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Put navigable choices in the URL

If a user should be able to copy a link, bookmark a filter, refresh without losing a selection, or use browser navigation to return to a prior choice, represent that state in query parameters. A Client Component can read current query values with useSearchParams. This is especially useful when the component only needs to adjust data that is already available in the browser; if the query must select server-fetched data, use the page prop instead.

What changes for layouts and static routes?

Layouts do not receive current search parameters

A shared layout does not receive a searchParams prop. Layouts are reused across navigation and do not rerender, so a query value read there could become stale. For data loading based on the current URL, read the values in the page and pass what is needed down. For a layout-level interactive control that needs current query values, use a Client Component with useSearchParams. The useSearchParams reference describes the hook and its rendering behavior.

Account for Suspense when using the hook on a static route

On a statically rendered route, a Client Component that calls useSearchParams causes the subtree up to the closest Suspense boundary to be client-side rendered. Put the query-reading component under a <Suspense> boundary when you want the surrounding static content to remain statically rendered. On a dynamically rendered route, the hook is available during the Client Component’s initial server render and then reflects later client navigation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How can server-rendered UI and client state work together?

A Client Component does not have to own every piece of UI it surrounds. Next.js documents passing Server Component output as children to a Client Component, which lets the server-rendered content remain composed within an interactive wrapper. When using providers, place them as deep in the tree as practical so more static server-rendered regions remain optimizable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a specific cross-component data-sharing pattern, the documentation describes using request-scoped React.cache with a context provider to share a fetched promise between Server and Client Components. This cache is scoped to the current request; it is not a persistent state store shared across requests. Use the pattern when that composition is needed, not as a general replacement for choosing the right location for UI or URL state.

Does using Server Components make a route faster or static?

Not automatically. Server Components can keep their own JavaScript out of the client bundle and fetch data on the server, but route behavior still depends on request-time inputs, caching, and the rendering strategy. Dynamic APIs such as searchParams can opt a route into dynamic rendering. Static output, cached data, streaming, and request-time rendering are choices to make according to the route’s freshness and data needs; a mixture may be appropriate.

There is no single performance result implied by the component type. The boundary determines which code and descendants join the client module graph, while the route’s data dependencies and rendering configuration determine whether work can be cached, streamed, or must respond to the request. The Next.js caching guide explains the relevant caching and rendering trade-offs. The guidance here reflects official Next.js documentation accessed October 5, 2026; check the documentation for the Next.js version you use because framework behavior can change.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.