From the course: The Freelance Stack: Real Project with Next.js and Strapi

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Server and client components overview

Server and client components overview

Now we're getting to one of the core concepts in Next.js 13, which are the server and client-side components. If you're coming from a React background and you haven't checked with the newer versions of React in some time, you might actually only know the right-hand side here, the client-side components. On the other hand though, in Next.js now, we are actually by default server first, meaning that all of our components, unless otherwise specified, are server-side components. So what are they? Well, compared to client-side components, they are completely built and rendered on the server, so they arrive ready on the client. Nothing else has to be input, no JavaScript has to be added, and all of that is already within the component that gets sent from the server. On the other hand, the client-side components, and this is slightly different to how React used to do this, but in Next.js the HTML of the client-side component is also built on the server, but the interactivity, so anything…

Contents