← Back to posts

Server vs Client Components

Server Components run only on the server, sending zero JS to the client. They are ideal for data fetching, DB access, and sensitive logic. Client Components ('use client') hydrate in the browser with full interactivity: useState, useEffect, and event handlers. The key is to use Server Components by default and Client Components only where interactivity is needed.

slugserver-vs-client— extracted from the URL via [slug]/page.tsx