October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

Does `searchParams` Make a Next.js Page Dynamic?

In the Next.js App Router, consuming a Page’s searchParams makes the page depend on request-time data. Learn how that differs from useSearchParams and Cache Components.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes: in the Next.js App Router, reading a Page’s searchParams opts that page into dynamic rendering at request time under the standard rendering model. The query string is part of the incoming request, so its value is not available when Next.js prerenders a single static result at build time. Cache Components provide a separate option: defer query-dependent content behind Suspense while prerendering a static shell.

Why the Page prop changes rendering

The App Router Page prop represents the current URL’s query parameters. For example, ?sort=asc makes the value of sort depend on the request that reaches the server. Next.js therefore cannot know that value ahead of time for one build-time-rendered page. Its current Page reference calls searchParams a Dynamic API and says using it opts the page into dynamic rendering at request time. Next.js Page reference

As an Amazon Associate I earn from qualifying purchases.

In current documentation, the prop is a promise that resolves to a plain JavaScript object—not a URLSearchParams instance. Repeated query keys can resolve to arrays. Access it in an async Server Component with await:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
export default async function Page({ searchParams }) {
  const { sort } = await searchParams

  return <p>Sort order: {sort ?? "default"}</p>
}

The rendering consequence comes from consuming request-specific data, not merely mentioning an unused prop in a TypeScript type. The Next.js layouts and pages guide describes the Page prop and alternatives for accessing query values.

How this differs from the client hook

searchParams on a Page and the useSearchParams Client Component hook are related but do not have the same rendering effect. On a statically rendered route, using useSearchParams causes the Client Component tree up to its nearest Suspense boundary to be client-rendered. The rest of the route can remain static, so a Suspense boundary can limit the portion that depends on the query. On a dynamically rendered route, the hook is available during the initial server render. Next.js useSearchParams reference

What changes with Cache Components

Cache Components are an opt-in rendering model. With them enabled, a route can prerender a static shell and place runtime data—including query-dependent content—behind a Suspense boundary. The shell is included in the prerendered output; the part that needs the request’s query resolves at request time. This is not the same as making the query value available during static generation. Next.js Cache Components guide

Runtime data requires request context and cannot itself be cached with use cache. Where appropriate, extract the needed values and pass them to a cached function. The guide’s pattern allows static and request-dependent parts of a page to be handled separately rather than treating the entire output as one indivisible result.

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

Version and configuration details to check

Current Page documentation uses an asynchronous searchParams prop. Next.js 14 and earlier used synchronous access; Next.js 15 kept synchronous access temporarily for compatibility and documents that it will be deprecated. Use the API shape documented for the version your application runs rather than copying an older synchronous example into current code.

Rendering configuration also depends on which caching model is active. In the previous model, the route-segment setting dynamic = 'force-static' forces prerendering and makes request APIs—including cookies, headers, and useSearchParams—return empty values. That setting cannot provide a real request-specific query value in a request-independent static result. Its behavior should not be assumed to apply unchanged when Cache Components are enabled. Next.js caching guide for the previous model

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

Check what your route actually renders

  1. Confirm the Next.js version and whether Cache Components are enabled; the API shape and rendering configuration depend on them.

  2. Identify whether the route consumes the Page prop, uses the client hook, or does both. Note whether query data is needed to fetch server data or only to update a client-side view.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  3. Build the application for production and inspect the route summary and rendered output. Check whether the route is rendered at request time or has a prerendered static shell, and verify which query-dependent content waits for the request.

The Next.js production checklist recommends intentional use of dynamic APIs and checking route behavior. A production build is more informative than assuming a route is static based on how its source code looks.

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.

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
Crashes, No Sound, or Screen Glitches?Free driver scan

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.