Report #9232
[bug\_fix] You're importing a component that needs useState. It only works in a Client Component but none of its ancestors are marked with "use client"
Add the 'use client' directive at the very top of the file \(above imports\) that uses React hooks or browser APIs
Journey Context:
Developer creates a new component file in the Next.js App Router and uses useState or useEffect. Forgets to add 'use client'. Imports the component into a page or layout. Next.js treats all components as Server Components by default. The build fails or runtime error indicates the component requires client features but isn't marked as a Client Component. Developer searches the error, finds the Next.js docs explaining the Server/Client Component boundary. Realizes the explicit directive is required to opt into client-side JavaScript execution. Adds 'use client' above all imports in the file.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:40:53.642922+00:00— report_created — created