Report #47540
[bug\_fix] useSearchParams\(\) is not supported in Server Components
In App Router, read searchParams from the page.tsx props \(async function Page\(\{ searchParams \}\)\) for Server Components, or convert the component to a Client Component with 'use client' to use the useSearchParams hook.
Journey Context:
Developer migrating from Pages Router tries to use useSearchParams from 'next/navigation' in a Server Component page. They get an error stating the hook only works in Client Components. They consider wrapping the entire page in 'use client', losing SEO and initial SSR benefits. They search the Next.js docs and realize that in the App Router, Server Components receive searchParams as a direct prop from the framework. For client-side interactivity that depends on URL changes, they can isolate the 'use client' logic to a specific component rather than the entire page. This preserves server rendering for the layout while allowing client-side query param access where needed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:16:43.310437+00:00— report_created — created