Component-driven development is everywhere, but it predates React and Vue by a wide margin. Server-rendered partials, includes, snippets and templates have existed since the early days of the web, and the modern frameworks that write reusable JavaScript code into the browser are a much younger development. Both kinds of components remain relevant. The meaningful distinctions come down to who renders them, how interactivity ships, what the performance profile looks like, and which languages and styling approaches are available.
Who renders the component
Server components are compiled into HTML by the server before the browser ever receives them. They are rarely called components; depending on the framework, they are partials, includes, snippets or templates. They come in two flavors. The classic approach renders them on request in real time:

The Jamstack approach compiles the entire site at build time, so static HTML is already waiting when a request comes in:

In both cases the browser sees only HTML and never draws a distinction between components.
Client components, by contrast, are rendered in the browser. Early implementations, including frameworks such as Polymer and Stencil, use the shadow DOM to encapsulate styles and functionality. More popular frameworks like React and Vue handle DOM manipulation and scoping on their own. Web components are themselves reusable HTML bits written in JavaScript and made functional by the browser. The server, of course, knows the HTML but not the behavior of client components; what it does with that knowledge depends on the framework.
The cost of interactivity
Interactivity is where the two models diverge most. Server components reach the client as plain HTML, so anything that needs to respond to the user must load JavaScript separately, and that JavaScript must attach itself to the right elements.

Now consider a countdown timer if its presentation is determined by HTML and CSS but the count itself needs JavaScript. Alongside the script, the application also requires a way to bind the script to the countdown's element(s), either manually or through yet another framework.
Client components keep their JavaScript local and executed on the client, so on the server, they render the components directly to final visual appearance.
Performance trade-offs
In a straightforward one-to-one comparison, server-side components come out ahead. A page that already contains everything it needs for presentation can be delivered faster. Better still, when the page needs nothing more than markup, no additional network round-trip is required at all.


Client components that use CSS-in-JS ship the interactivity code and their styles alongside each other.
Client-side components, by contrast, need JavaScript — often spread across separate files — down to the browser and executed before anything renders.
Client components do have a mitigating factor: they usually live inside a larger framework. React has Gatsby and Next, Vue has Nuxt, and these supply mechanisms for a strong in-app experience. The first page a visitor loads may be slower, but subsequent views can arrive extremely fast, often faster than a server-rendered site can deliver its content.
Languages
Nearly any server-side language works for server templates, and this lets you template components in the same language as the application logic. Rails applications, for example, use the Ruby-based ERB templating by default.
Client components are written in JavaScript because that is the language browsers parse. JavaScript also has server runtimes, most prominently Node.js, so client component code can share a language with the application provided the application runs on Node or a similar environment.
Styling
Styling server-side components runs into the same problem as JavaScript: styles are typically detached from the components and take extra work to connect to their elements. Frameworks such as Tailwind CSS are trying to make the process less painful.
Many client-side component libraries ship with CSS support or at least a styling pattern out of the box. This often means markup and logic coexist in one file, which can get messy, but the arrangement can be adjusted with a little effort.
Toward a hybrid model
Neither type of component is the answer on its own. Server components bring extra effort in styling, interactivity and communication between client and server; client components compromise front-end performance, and since the success of a site depends on engagement, poor performance can cost you.
The future most likely brings the two together, in three developments worth tracking.
Pre-rendering and hydration mature
React, Next and Nuxt act as front-end engines built on top of component frameworks like React and Vue. They bring tooling together for a full front-end experience. One such feature is pre-rendering: these engines introspect components and write static HTML while the site is being built, so the page is actually already present when a user views it, without needing JavaScript to be viewed.
JavaScript then returns through hydration. Once the page loads, JavaScript takes over the components to make them interactive. That provides a client-side, component-based website with some of the benefits of the server, namely performance and high visibility to search engines.
It's not automatically perfect, though. These tools have become very popular because of this approach, and I expect they'll continue to advance.
SSR becomes the default inside the frameworks themselves
This raised the question: why doesn't React or Vue take on server-side rendering? They now do, but it isn't easy to implement on your own; you needed a larger framework like Gatsby or Next to help. React has started moving this way (data fetching with React Server Components), Vue is in this direction, and Svelte has prioritized the approach from the beginning. Expect more development as these traditionally client-side-focused tools solve for server-side rendering, and expect Svelte to get more attention. More competitors to bulkier tools like Gatsby and Next seem likely too; Netlify's website is an example of an Eleventy project that pulls in Vue components and renders them for use on the server. The piece still missing there is hydration and interactivity.
Interactivity for server components
And still, we can't discount the continued use of server-side components. The other two conclusions both rely on JavaScript frameworks that can feel unnecessary when you need only a little interactivity. Something simpler is missing. Team Platform at Basecamp deserves credit here—they built Hotwire, which brings the reactivity of client components to server-rendered HTML with (almost) any server-side language. This could even revive full-stack monolith companies in Rails without sacrificing what React brought to the table.



