{"repo":"bholmesdev/simple-rsc","free":true,"listed":false,"github":"https://github.com/bholmesdev/simple-rsc","clone":"git clone https://github.com/bholmesdev/simple-rsc.git","description":"A simple React Server Components implementation that you can build yourself 🙌","language":"JavaScript","stars":757,"topics":["react","video"],"license":null,"category":"media-processing","readme_excerpt":"Simple RSC ⚛️ A simple React Server Components implementation that you can build yourself. Watch the \"build from scratch\" code-along video to learn how all of the pieces fit together. Or... just read the in-line documentation in this codebase :) Goals - 🌊 Show how React server components are streamed to the browser with a simple Node server. - ⚙️ Demo a build process to bundle server components and handle client components with the \"use client\" directive. Getting started Install dependencies using npm and start the Node development server: This should trigger a build and start your server at http://localhost:3000. Developer note on the dev script You'll notice the dev script maps to the following command in the package.json : The --conditions flag is part of the Node.js conditional exports system. This allows packages to export different versions of a module depending on your environment. When passed react-server , react-server-dom-esm will expose a server-only module that omits React's client-side or browser-specific APIs, ensuring compatibility with the server-rendered environment. Project structure This project is broken up into the app/ and server/ directories. The most important entrypoints are listed below: What is not included? - File-based routing conventions. This repo includes a single index route, with support for processing query params. If you need multiple routes, you can try NextJS' new app/ directory. - Advance bundling for CSS-in-JS. A Tailwind script is inc","default_branch":null,"files":null,"tree":[],"storefront":"/r/bholmesdev","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bholmesdev/simple-rsc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}