Reasons to use client components
- Enable user interactivity on the page (for example clicking buttons)
- React hooks like useEffect and useState
- Access to browser API (like audio or screen recorders)
- Access to the window object
- Class Components
Reasons to use server components
- Access to sensitive data
- Fetching data from the database
- Render less JS on the user's device
Link to docs: https://nextjs.org/docs/getting-started/react-essentials
Download
0 formats
No download links available.
Next.JS 13.4 When to Use Client Components vs Server Components | NatokHD