Hacker News new | ask | show | jobs
by verdverm 700 days ago
> But, everywhere are server components, it means, you can't use useState, useEffect and such client-function at all. It means, nextjs turns the SPA to refresh page.

You can pass client components to server components, and have access to hooks & effects. See

- https://nextjs.org/docs/app/building-your-application/render...

- https://nextjs.org/docs/app/building-your-application/render...

You are also not required to use server components with NextJS and you can use it as a better overall DX and simplifications like directory (convention) based routing