Server components explained for product owners
Server components build most of a page on the server and send finished HTML, so visitors download less code. What that means for speed, cost and hiring.
By Sohail Hussain10 November 20265 min read
Server components are parts of a web page that are built on the server and sent to the browser as finished HTML, without the code that produced them. Only the interactive parts of a page, such as a menu toggle, a form or a calculator, send code to the visitor's phone. The result is a page that loads faster, keeps secrets such as API keys off the visitor's device, and costs less JavaScript to run.
If you own a product or a company website and your developer has said "we'll use server components", this is what they mean and what it changes for you. It is also how we structure pages in our website design and development projects, so this is the explanation we give clients.
How did React pages work before server components?
A typical React site sends the browser two things: some HTML, and a bundle of JavaScript containing every component on the page. The browser runs that JavaScript to rebuild the page in memory and attach click handlers. This step is called hydration.
The catch is that the JavaScript includes code for parts of the page that never change. The footer, the article text, the pricing table and the testimonials all ship as code, even though the visitor only ever reads them. On a fast laptop that is invisible. On a mid-range Android phone over a mobile connection, it is seconds of downloading and processing before taps respond.
What changes with server components?
Each component is one of two kinds.
- Server components run only on the server. They can read from a database or a CMS directly, use private API keys, and produce HTML. Their code stays on the server.
- Client components are marked with
"use client"at the top of the file. They run in the browser as well, so they can respond to clicks, keep state and use browser features such as location or local storage.
In the Next.js App Router, every component is a server component unless a developer marks it otherwise. A typical company page ends up mostly server components with a few small client components dropped in where interaction is needed.
| Server component | Client component | |
|---|---|---|
| Where the code runs | Server only | Server for the first render, then the browser |
| Code sent to the visitor | None | Yes, all of it |
| Can read the database or CMS directly | Yes | No; goes through an API |
| Can use secret keys safely | Yes | No |
| Can respond to clicks, typing, scrolling | No | Yes |
| Good for | Content, layout, data display | Menus, forms, filters, calculators, carousels |
The React documentation on server components is the official reference if your team wants the detail.
What does this mean for my product?
Faster pages on real phones. Less JavaScript means less to download and less for the phone's processor to run. That shows up in two of Google's Core Web Vitals: Largest Contentful Paint, which measures when the main content appears, and Interaction to Next Paint, which measures how quickly the page responds to a tap. Core Web Vitals explained covers both. Our page weight calculator shows how long a given amount of script and images takes to load on 3G and 4G, before the phone has even started running it.
Fewer security mistakes. Because a server component's code never reaches the browser, a developer can call a CMS or a database with a private key inside it without exposing the key. In older setups, keeping secrets out of the browser bundle needed extra API endpoints and discipline.
Simpler data plumbing. A server component can fetch the data it needs where it is used. There is less code that exists only to move data from a server endpoint into the page, which means fewer places for bugs.
Better search visibility. The HTML arrives with the content already in it, so search engines and social media previews see the full page without running JavaScript. Next.js for SEO goes through what that changes.
This is a large part of why we build company websites with Next.js.
What are the trade-offs?
Server components are not free. A product owner should know the costs as well as the gains.
Developers need to know the model. A team new to server components will spend time learning which code runs where, and what can be passed from server to client. Expect slower progress in the first weeks if your team has not used them, and ask about experience when hiring.
Some libraries need a wrapper. Older UI kits, chart libraries and analytics snippets that assume a browser have to be placed inside a client component. This is a small job each time, but it is a job.
Interactive products gain less. A dashboard where almost everything responds to clicks will be mostly client components anyway. Server components still help with the data loading and the static frame around it, but the savings are smaller than on a content site.
Debugging spans two places. An error can come from the server or the browser, and developers need to check both. Good error tracking set up from the start makes this manageable.
None of these outweighs the benefits for a typical company website, marketing site or content-heavy product. For a highly interactive tool, the case is weaker, and a team that knows another approach well may ship faster with it.
What should I ask my developer?
You do not need to read the code to check that server components are being used well. Ask these four questions.
- "Which parts of this page are client components, and why?" A good answer names specific interactive pieces. "The whole page" is a warning sign, often caused by adding
"use client"to a top-level layout. - "How much JavaScript does the homepage send?" Your developer can read this from the build output or the browser's Network tab. Compare it before and after big changes.
- "Where do the API keys live?" They should be read only in server code and stored as environment variables without the
NEXT_PUBLIC_prefix, which would send them to the browser. - "What happens if the CMS is slow?" Server components can show the rest of the page immediately and stream in a slow section when its data arrives. A good build uses this rather than holding the whole page.
If the answers are clear, the architecture is doing its job. If you are choosing between routing approaches in Next.js as part of the same decision, App Router vs Pages Router explains the options, and server components are only available in the App Router.
Was this guide useful?