Server Components to the Rescue: Turbocharging and Empowering Your React Apps with Style

Rate this content
Bookmark

Join us as we dive into the exciting world of React Server Components, an feature designed to revolutionize the way we build web applications. In this action-packed talk, we'll explore the key benefits of Server Components, such as reduced client-side code, improved performance, and streamlined development experience. Through engaging examples and live demos, you'll learn how to integrate Server Components into your React projects and harness their power to create next-level user experiences. Don't miss out on this opportunity to stay ahead of the curve and elevate your React skills!

This talk has been presented at React Summit US 2023, check out the latest edition of this React Conference.

Watch video on a separate page

FAQ

React server components are components that run on the server, allowing full access to backend resources like databases and file systems without impacting the initial load time. They help in improving performance by reducing the amount of code sent to the client.

React server components were first introduced by the React team on December 21st, 2020.

The main benefits include easy maintenance, quick build times, improved performance metrics, and enhanced user experiences. They minimize the code needed at startup and streamline data formatting and retrieval.

React server components improve page load times by minimizing the amount of JavaScript that needs to be downloaded at startup. They handle much of the logic on the server side, thereby reducing the initial payload and processing needs on the client side.

No, React server components do not interact directly with browser APIs. They are used for server-side operations, while client-side interactions and effects must be handled by client components.

Server components operate on the server and handle tasks like interacting with databases and other back-end services. Client components run in the browser and manage user state, effects, and interactions with browser APIs.

React server components cannot use local storage, interact with Bluetooth, or access the webcam. They also can't use hooks like useState or useEffect, which are designed for client-side state management and side effects.

Future enhancements for React server components include improving the synchronization of state between server and client, enabling server components to re-render in response to state changes, and maintaining client-side interactivity without full page refreshes.

Pillippa Pérez Pons
Pillippa Pérez Pons
16 min
15 Nov, 2023

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Welcome to the server components to the rescue, turbo charging and empowering your React application with style. React server components were introduced three years ago, providing an easy-to-maintain and quick-to-build solution with improved metrics and user experience. By using server-side rendering, there is no need to download code to the client at startup. Server components reduce the cost of attractions and provide a unified solution. The future of React server components includes improving state synchronization, allowing server components to re-render in response to state changes, and enabling fluid UI updates without page refresh.

1. Introduction to React Server Components

Short description:

Welcome to the server components to the rescue, turbo charging and empowering your React application with style. React server components were introduced three years ago, providing an easy-to-maintain and quick-to-build solution with improved metrics and user experience. By using server-side rendering, there is no need to download code to the client at startup.

Welcome to the server components to the rescue, turbo charging and empowering your React application with style.

Who I am? I am Phillipa Perez Ponce, I am software engineer and frontend lockads and volume sharing. And today I will like to speak about React server components.

Before that, almost three years ago, especially in December 21st, 2020, the React team first introduced us to the React server components. Before that, we knew the interaction between server and client. As we have the data in the server, we have the UI interactions in the client. So, we started to use client side rendering, and the client side rendering is like this. We have a server, we have a device, and we ask to the server about the page. And HTML, we ask for the bundle, and JavaScript, CSS, return the bundle. And we saw the bundle, we do all the things, and we ask the data. And return the data. And finish in render the page.

This look like our first paint, our page interactives. It's okay. Our full content, full paint. It's not so good. It's a little really expensive. Our metrics are not good. Our users don't have a good experience. They suffer. We suffer. Our paint increase. So we try different tools, different architectures, different rendering. For what? To avoid this to try to have better metrics, to try to have better, better experience.

Better user experience. So that day, React server components bring us with an idea, free ideas. Easy to maintain, quick to build, improved metrics, improved user experience. And you can use it in your favorite rendering. And what are the benefits? Why are you using that for these free ideas only? No, we are using this because it has better advantage. As we are using the server, there is no code that you need to download to the client at the startup time.

2. Introduction to React Server Components - Part 2

Short description:

So also you can apply formatting to the data. Full access to the backend. Automatic spreading with less code. Non-client server waterfall eliminates the need for separate requests. Server components reduce the cost of attractions and provide a unified solution. React Server components consist of client and server components.

So also you can apply a formatting in the data. You can do a format to the data, string, date. What is next? Full access to the backend. As you are using the server, you can use microservice, you can use the file system, you can use the database without cost to the start time.

Automatic spreading. This is because, previously, we used the lazy import, we used the dynamic import, and, right now, you only need to do is import Lala from Lala, and you have voila! You do automatically, and without much code. Even with less code.

Non-client server waterfall! This is because we eliminate the wrong type. So, you have this that is okay. You have the HTML. You have the bundle. Go to the bundle and go with the data. So, then, this time, is build the thing and build the page. So, you don't have this, okay, I need the bundle. I need the data. And you have all in one request.

Avoid attraction tasks. This is because server components reduce the cost of attractions. You can put all the logic, the product logic in the server, and you can have several layers of the attractions. And this only brings to the client that all these render elements for the client is ready. So the view is more look and feel and nice to have in a way that you have only that pure rendering. And the same challenge in Unified Solutions, you have the same code for solution. You have the same code for in the server, you have the same code in the client. So you don't need to have a different language for the server and for the client. You can have all in one place.

First, we spoke about our React Server components. We spoke about the benefits, and right now who is React Server components? We have client components that lives in the clients, lives in the browser. And we have the server components, which lives in the servers. This is our first part of the situation in the React Server component, our React components and client components. This is a note.

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 Conference 2023React Advanced Conference 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 Conference 2023React Advanced Conference 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.
Batteries Included Reimagined - The Revival of GraphQL Yoga
GraphQL Galaxy 2021GraphQL Galaxy 2021
33 min
Batteries Included Reimagined - The Revival of GraphQL Yoga
Envelope is a powerful GraphQL plugin system that simplifies server development and allows for powerful plugin integration. It provides conformity for large corporations with multiple GraphQL servers and can be used with various frameworks. Envelope acts as the Babel of GraphQL, allowing the use of non-spec features. The Guild offers GraphQL Hive, a service similar to Apollo Studio, and encourages collaboration with other frameworks and languages.

Workshops on related topic

Next.js 13: Data Fetching Strategies
React Day Berlin 2022React Day Berlin 2022
53 min
Next.js 13: Data Fetching Strategies
Top Content
WorkshopFree
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
WorkshopFree
 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
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
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
Build a Custom Storefront on Shopify with Hydrogen
React Advanced Conference 2021React Advanced Conference 2021
170 min
Build a Custom Storefront on Shopify with Hydrogen
Workshop
Matt Seccafien
Cathryn Griffiths
2 authors
Hydrogen is an opinionated React framework and SDK for building fast, custom storefronts powered Shopify. Hydrogen embraces React Server Components and makes use of Vite and Tailwind CSS. In this workshop participants will get a first look at Hydrogen, learn how and when to use it, all while building a fully functional custom storefront with the Hydrogen team themselves.