Vanilla Server Components

This ad is not shown to multipass and full ticket holders
React Summit
React Summit 2026
June 11 - 15, 2026
Amsterdam & Online
The biggest React conference worldwide
Learn More
In partnership with Focus Reactive
Upcoming event
React Summit 2026
React Summit 2026
June 11 - 15, 2026. Amsterdam & Online
Learn more
Bookmark
Rate this content

Discover the power of Server Components in React without the need for a framework. In this talk, we will explore how to build a simple server-side rendering solution using "only" vanilla JavaScript and Node.js. We'll dive into the core concepts of Server Components, including how to render components on the server abd manage data fetching. By the end of this session, you'll have an understanding of how to implement Server Components in your own projects without relying on a framework.

This talk has been presented at React Advanced 2025, check out the latest edition of this React Conference.

FAQ

Vanilla Server Components in React are components that can be used outside the framework world to render parts of a React app on the server side. They aim to improve the user experience by handling server-side rendering and asynchronous data fetching.

Krasnzony describes three use cases: 1) Building single-page apps with a compiler like Webpack or Vite without server-side rendering; 2) Controlling the compiler and HTTP server for server-side rendering; 3) Relying on a framework that handles everything out of the box.

HTTP streaming allows the server to send data in chunks instead of all at once, which can improve user experience by allowing parts of the page to load progressively, showing a shell or spinner while fetching data asynchronously.

The 'transfer encoding chunked' header allows the server to notify the browser that it will send multiple data chunks, keeping the TCP connection open until all data is sent, improving data loading efficiency.

The 'render to pipeable stream' function allows React to render components to a stream, sending chunks of HTML to the browser as they are ready, improving asynchronous data handling and user experience.

React's 'suspense' and 'use' functions help manage asynchronous data fetching by allowing components to wait for data promises to resolve, improving the rendering process and user experience by showing fallbacks like spinners until data is loaded.

Challenges include a different mental model for developers, build complexity, issues with type safety, serialization constraints, and difficulties in testing client-server interactions.

The mindset shifts to being more server-oriented, where most components are server-side and only a few client-oriented components handle interactivity, contrasting with traditional client-heavy models.

ForkIt is a tool created by Krasnzony to prepare TypeScript files for client and server use by separating server logic and client components, aiding the implementation of Server Components outside a framework.

Limitations include build complexity, challenges with custom validation, handling cookies and headers, ensuring serialization constraints, and the difficulty of testing server-client interactions.

Krasimir Tsonev
Krasimir Tsonev
24 min
01 Dec, 2025

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Krasnzony discusses the introduction of vanilla Server Components inspired by React Summit, focusing on challenges of using components outside a framework. The talk emphasizes improving user experience in React apps through HTTP streaming, sending data to the browser with script tags, and implementing asynchronous components for server-side rendering. Enhancements to React rendering include the pipeable string API for data rendering and server-side dynamic rendering transitioning to client-side interactivity. Challenges in supporting server components and transitioning to server-oriented components are also explored.
Available in Español: Vanilla Server Components

1. Exploring Vanilla Server Components

Short description:

Krasnzony introduces vanilla Server Components, inspired by React Summit. He discusses different React ecosystem use cases, from traditional single-page apps to frameworks. Emphasizes the challenge of using components outside a framework, focusing on controlling compilers and servers for personal projects.

Hey everyone, I'm Krasnzony from Bulgaria, and I'm going to talk about vanilla Server Components. The motivation behind this presentation was another conference that happened early this year, React Summit. I was there, and I had this chat with a couple of folks from Verceo, from Meta, about Server Components. My main question was how to use these components outside of the world of a framework. The answer was basically, and my conclusion, was basically that it's really, really difficult. So I decided to explore this area, these ideas, and this is where this presentation is coming from.

In my head, the ecosystem in React is split in three different use cases. The first one is the old way of building single page apps, where we have the compiler, which is some sort of a building tool like Webpack or Vite or something else, Babel. We have this pipeline where we build the bundle, we throw it to a CDN and we ready up from there. If there's no server-side rendering, it's only a single page app running in the browser. Then there's this other group of apps where we own the compiler, meaning that we pick what we want to use. But we have our own HTTP server, which is delivering the main HTML, which is maybe delivering the assets and everything. In this case, we do have a server-side rendering, meaning that we could actually render React on the server and handle this on our own.

And the third option is basically relying on a framework, which immediately removes the question about picking a compiler, how everything works, it's basically hidden there. So we don't have to think about this, it's just working out of the box. The world where I live for a really long time is basically this middle group, which is we control the compiler, Vite or Webpack. We control the HTTP server, Express usually, and we do everything ourselves. So this is the area which at work, I'm using in my personal projects. And I think from a developer point of view, it's quite interesting because we have the option to explore stuff. But in the context of this presentation, this is the thing which I'm going to talk about, making several components work inside this type of setup.

2. Improving User Experience with HTTP Streaming

Short description:

Discussing the challenges of React apps on the client, focusing on server-side data fetching and user experience improvement through HTTP streaming.

So let's say that we have a really simple HTTP server without React at all. This is an ExpressJS server. We ask from the browser, hey, give me a page. We then respond just with simple HTML. We have the styles, the bundle, and that's it. Then this was the case where everything is static. We don't have to fetch anything, it's just returned HTML. But then what happens if we have to get some data? In this example, I'll rely on the typical case where we have a block. Basically, we need to fetch the blog post and the comments for each blog post. So we have to do some work, which is asynchronous. We have to go to the database, get some data, render the data, and so on.

So what happens in the handler of the HTTP server is that we wait, basically. We wait to get the posts, then the server is doing its job, going to the database, getting the posts. We wait to get the comments. We assemble some sort of response, meaning that we combine the posts and the comments. And then we return everything at once. And then the TCP connection is dropped, and that's it. The problem with this is that the user experience is bad. And this is basically the challenge that we had with React apps, that they were on the client always. So the user sees nothing until we get all the data and we render everything. So from a product point of view, we may say, okay, we don't care much about the comments, so let's render the shell, basically the basic HTML of the page, all the layout and stuff, and render the posts, the blog posts, and then fetch the comments on the client.

The better option, though, is to send the shell, show a spinner, for example, loading, then we get the posts, and then we get the comments. And this is the idea of this whole exercise. We want to provide a better experience when using React. Now the answer of this is actually HTTP steering. And when I started exploring the server components, this was basically the very first thing which I realized, is that this is not something new. It's there from HTTP protocol version 1.1. So it's really old. It's really old pattern technique to actually send data from the server to the browser.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Simplifying Server Components
React Advanced 2023React Advanced 2023
27 min
Simplifying Server Components
Top Content
Watch video: Simplifying Server Components
React server components simplify server-side rendering and provide a mental model of components as pure functions. Using React as a library for server components allows for building a basic RSC server and connecting it to an SSR server. RSC responses are serialized virtual DOM that offload code from the client and handle interactivity. The client manifest maps serialized placeholders to real components on the client, enabling dynamic rendering. Server components combine the best of classic web development and progressive enhancement, offering the advantage of moving logic from the client to the server.
Exploring React Server Component Fundamentals
React Day Berlin 2023React Day Berlin 2023
21 min
Exploring React Server Component Fundamentals
Top Content
Watch video: Exploring React Server Component Fundamentals
This Talk introduces React Server Components (RSC) and explores their serialization process. It compares RSC to traditional server-side rendering (SSR) and explains how RSC handles promises and integrates client components. The Talk also discusses the RSC manifest and deserialization process. The speaker then introduces the Waku framework, which supports bundling, server, routing, and SSR. The future plans for Waku include integration with client state management libraries.
And Now You Understand React Server Components
React Summit 2024React Summit 2024
27 min
And Now You Understand React Server Components
Top Content
In this Talk, Kent C. Dodds introduces React Server Components (RSCs) and demonstrates how to build them from scratch. He explains the process of integrating RSCs with the UI, switching to RSC and streaming for improved performance, and the benefits of using RSCs with async components. Dodds also discusses enhancements with streaming and server context, client support and loaders, server component rendering and module resolution, handling UI updates and rendering, handling back buttons and caching, and concludes with further resources for diving deeper into the topic.
A Practical Guide for Migrating to Server Components
React Advanced 2023React Advanced 2023
28 min
A Practical Guide for Migrating to Server Components
Top Content
Watch video: A Practical Guide for Migrating to Server Components
React query version five is live and we'll be discussing the migration process to server components using Next.js and React Query. The process involves planning, preparing, and setting up server components, migrating pages, adding layouts, and moving components to the server. We'll also explore the benefits of server components such as reducing JavaScript shipping, enabling powerful caching, and leveraging the features of the app router. Additionally, we'll cover topics like handling authentication, rendering in server components, and the impact on server load and costs.
Server Components: The Epic Tale of Rendering UX
React Summit 2023React Summit 2023
26 min
Server Components: The Epic Tale of Rendering UX
Top Content
Watch video: Server Components: The Epic Tale of Rendering UX
This Talk introduces server components in React, which provide an intermediate format for rendering and offer advantages for both client-side and server-side rendering. Server components reduce bundle size on the client and improve search engine optimization. They abstract the rendering process, allowing for faster rendering and flexibility in choosing where to render components. While server components are still in the experimental stage, Next.js is a good starting point to try them out.
RSCs In Production: 1 Year Later
React Summit 2024React Summit 2024
24 min
RSCs In Production: 1 Year Later
This Talk explores the experience of shipping server components in production and highlights the benefits and challenges of using Server Components in Next.js apps. The Talk discusses the deployment of UploadThing and the use of AppRouter for safe production usage. It delves into the implementation of different layouts, data fetching, and code centralization for improved performance. The Talk also covers the use of server components for performance optimization and latency handling. Additionally, it explores the use of Edge and Lambda for partial pre-rendering and the challenges faced with webpack performance and hydration. Overall, the Talk emphasizes the benefits and challenges of working with Server Components in Next.js applications.

Workshops on related topic

Mastering React Server Components and Server Actions in React 19
React Summit US 2024React Summit US 2024
150 min
Mastering React Server Components and Server Actions in React 19
Featured Workshop
Maurice de Beijer
Maurice de Beijer
Calling all React developers! Join us for an immersive 4-hour workshop diving deep into React Server Components and Server Actions. Discover how these game-changing technologies are revolutionizing web development and learn how to harness their full potential to build lightning-fast, efficient applications.

Explore the world of React Server Components, seamlessly blending server-side rendering with client-side interactivity for unmatched performance and user experience. Dive into React Server Actions to see how they combine client-side interactivity with server-side logic, making it easier to develop interactive applications without traditional API constraints.

Get hands-on experience with practical exercises, real-world examples, and expert guidance on implementing these technologies into your projects. Learn essential topics such as the differences between Server and Client Components, optimizing data fetching, passing data effectively, and maximizing performance with new React hooks like useActionState, useFormStatus and useOptimistic.

Whether you're new to React or a seasoned pro, this workshop will equip you with the knowledge and tools to elevate your web development skills. Stay ahead of the curve and master the cutting-edge technology of React 19. Don't miss out - sign up now and unleash the full power of React!
Next.js 13: Data Fetching Strategies
React Day Berlin 2022React Day Berlin 2022
53 min
Next.js 13: Data Fetching Strategies
Top Content
Workshop
Alice De Mauro
Alice De Mauro
- Introduction- Prerequisites for the workshop- Fetching strategies: fundamentals- Fetching strategies – hands-on: fetch API, cache (static VS dynamic), revalidate, suspense (parallel data fetching)- Test your build and serve it on Vercel- Future: Server components VS Client components- Workshop easter egg (unrelated to the topic, calling out accessibility)- Wrapping up
The Gateway to Backend: A Frontend Developer's Guide to Full-Stack Development
React Summit US 2023React Summit US 2023
160 min
The Gateway to Backend: A Frontend Developer's Guide to Full-Stack Development
Top Content
WorkshopFree
Amy Dutton
Amy Dutton
This workshop will guide you through the product development life cycle of creating a real-world web application. You will learn about React Server Components, building a design system within Storybook, and using frontend development to approach becoming a full-stack developer. The workshop will cover increasing confidence in your application with unit tests and implementing authentication and authorization. You'll have the opportunity to work through product features and examine a real-world RedwoodJS project, gaining valuable experience in real-world product development. RedwoodJS makes it simple to approach full-stack development, and this workshop will give you the skills you need to create your own real-world web applications.
Advanced Application Deployment Patterns with React Server Components (feat. a DIY RSC Framework)
React Summit US 2023React Summit US 2023
104 min
Advanced Application Deployment Patterns with React Server Components (feat. a DIY RSC Framework)
Top Content
Workshop
 Greg Brimble
Greg Brimble
The developer ecosystem is always moving fast and this year has proved no exception. React Server Components can offer a significant improvement to developer experience and to application performance. But I think it's fair to say that this new server-first paradigm can be tricky to wrap your head around!In the first half of this workshop, we'll explore React Server Components from the ground-up: building our own mini meta-framework to help us understand how RSCs work. We'll discover exactly what is produced by an RSC build and we'll connect those pieces together to form a full application.Next, we'll deploy it! Cloudflare have also had a busy year too — Smart Placement, in particular, is a new technology that we've developed which fits the RSC model perfectly. We'll explore why that makes sense for our workshop app, and we'll actually deploy it onto the Cloudflare Developer Platform.Finally, we'll build out our app a little further, using D1 (our serverless SQL database) to really show off the React Server Component's power when combined with Smart Placement.You should come away from this workshop with a greater understanding of how React Server Components work (both behind-the-scenes and also how you as a developer can use them day-to-day), as well as insight into some of the new deployment patterns that are now possible after recent innovations in the platform space.
Building Reusable Server Components in NextJS
React Summit US 2023React Summit US 2023
88 min
Building Reusable Server Components in NextJS
Top Content
Workshop
Will Bishop
Mettin Parzinski
2 authors
React continues to evolve their beta capability, React Server Components, and they're continuing to further develop them in partnership with frameworks like NextJS.In this workshop, attendees will learn what React Server Components are, how to effectively build and use them in NextJS, and focus on one of the major advantages of React/NextJS: reusability through components.We will also cover related beta technologies enabled by the `app` directory, such as nested layouts and server actions (alpha/experimental capability).Join us for this hands-on, 120 minute workshop!Technologies:
React, JavaScript/Typescript, NextJS, Miro
React Server Components Unleashed: A Deep Dive into Next-Gen Web Development
React Day Berlin 2023React Day Berlin 2023
149 min
React Server Components Unleashed: A Deep Dive into Next-Gen Web Development
Top Content
Workshop
Maurice de Beijer
Maurice de Beijer
Get ready to supercharge your web development skills with React Server Components! In this immersive, 3-hour workshop, we'll unlock the full potential of this revolutionary technology and explore how it's transforming the way developers build lightning-fast, efficient web applications.
Join us as we delve into the exciting world of React Server Components, which seamlessly blend server-side rendering with client-side interactivity for unparalleled performance and user experience. You'll gain hands-on experience through practical exercises, real-world examples, and expert guidance on how to harness the power of Server Components in your own projects.
Throughout the workshop, we'll cover essential topics, including:- Understanding the differences between Server and Client Components- Implementing Server Components to optimize data fetching and reduce JavaScript bundle size- Integrating Server and Client Components for a seamless user experience- Strategies for effectively passing data between components and managing state- Tips and best practices for maximizing the performance benefits of React Server Components