CodeZettaInterview Hub

Next.js · Client Components · Junior · Best Practice

When should a component be a Client Component?

Short Interview Answer

When it needs hooks, browser APIs, event handlers, or client-only libraries.

Detailed Explanation

Forms with controlled inputs, charts with window size, and auth UI with local state are common. Prefer small islands. If only a button is interactive, extract that button as client.

Did you know this answer?