Report #53519
[bug\_fix] You're importing a component that needs \`useState\`. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
Add the \`"use client"\` directive at the top of the file \(above imports\) where the hook or browser API is used. If the component is imported by a Server Component, create a client boundary by marking the imported file with "use client".
Journey Context:
Developer creates \`components/Counter.tsx\` with \`useState\`. Imports it into \`app/page.tsx\` \(a Server Component\). Next.js dev server throws error immediately. Developer confused because it worked in Pages Router. Realizes App Router defaults to Server Components. Tries adding "use client" to \`page.tsx\`, but that converts the entire page to client, losing SSR benefits. Correctly moves "use client" to \`components/Counter.tsx\`, understanding that the boundary must be at the point where client interactivity is needed, allowing the parent Server Component to remain server-rendered.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:19:41.049366+00:00— report_created — created