Next.js › Server Components
Why can't server components use hooks like useState or useEffect?
BeginnerAnswer
Server components render once on the server to produce static HTML and do not run again in the browser afterward, so hooks that manage ongoing client side state or respond to browser events have no meaningful place to run, since there is no continuous client side lifecycle for them to hook into.
// This would not work in a server component
export default function Page() {
// useState requires a client component
// const [count, setCount] = useState(0);
}Real-world example A developer tries adding a useState hook to track a counter inside a server component, gets an error, and learns to move that specific piece of interactive logic into a separate client component instead.