Write React Server Components from Scratch

Published: 06 July 2023
on channel: Tejas Kumar
11,114
546

Dan's post that inspired this: https://github.com/reactwg/server-com...
Repo: https://github.com/TejasQ/react-serve...
Creating Next.js from Scratch:    • Makeshift Next.js from Scratch (Server-Sid...  

Thank you to CrabNebula for sponsoring this video: https://crabnebula.dev

In this tutorial, we'll construct React server components from scratch using TypeScript, kind of mimicking Next.js app router. This effort is a cornerstone for understanding the mechanism behind React's component lifecycle, state management, and data fetching primitives.

Please note that this is a streamlined, barebones model that takes a significant number of shortcuts and isn't fully representative of the complete, in-depth implementation. It's designed to give you a working knowledge of React and Next.js, allowing you to comprehend the operations occurring behind the scenes. This should teach you how server components *works*, not how to use server components.

Throughout this guide, we will delve into the creation of React server components, exploring rendering them on the server and sending them to clients. By the end, you'll gain a foundational understanding of underlying mechanisms and applying it to your existing knowledge of JavaScript.

This knowledge forms a valuable foundation for your future endeavors in React-based web application development. Remember, our main goal here is to boost your comprehension of React server components, using TypeScript and Next.js as tools for practical learning.

Chapters

00:00 Intro
01:37 Sponsor
02:31 React as an architecture
05:48 What is React Server Components (RSC)?
08:17 Building a Sample Application
11:38 Adding Server Rendering
14:50 Creating Server Components
16:28 Rendering Server Components
24:49 Persisting State with Client-side React
33:16 RSC and CSR and SSR
34:57 Tools for Adopting RSCs
37:35 React is a Community


On this page of the site you can watch the video online Write React Server Components from Scratch with a duration of hours minute second in good quality, which was uploaded by the user Tejas Kumar 06 July 2023, share the link with friends and acquaintances, this video has already been watched 11,114 times on youtube and it was liked by 546 viewers. Enjoy your viewing!