react-server-components-workshop
react-server-components-workshop copied to clipboard
Slides
Prerequisites
-
Node.js 20.11.0 and npm 10.2.4
I recommend using a version manager like Volta, asdf or nvm.
-
A code editor
I recommend Visual Studio Code.
-
Sign up and verify your email address.
Getting started
-
Clone the workshop repository with Git:
git clone https://github.com/GregBrimble/react-server-components-workshop.gitOr if you prefer using SSH:
git clone [email protected]:GregBrimble/react-server-components-workshop.git -
Open this folder in your favorite code editor. I recommend VSCode.
-
Install the dependencies using
npm:npm install -
Log in with Wrangler:
npx wrangler login -
Populate the
CLOUDFLARE_WORKERS_SUBDOMAINvalue in./constants.ts. You can find your subdomain in the sidebar of the Cloudflare Workers & Pages dashboard. -
Get started with the first exercise in
./exercises/1-client-side-rendering. Check out theREADME.mdfile for instructions!
Contents
- Client-side rendering
- Intro to Workers
- Server-side rendering
- RSC data loading
- RSC compiler
- Loading data from a database
- Smart Placement
What's next?
Thank you for participating in this React Server Components 2024 workshop! I hope you found it valuable and had fun. If you're interested in being notified when my next workshop will be available, please sign up here!
After you've completed this workshop, there is much more you can explore with React Server Components and the Cloudflare Developer Platform. Some other topics of interest may include:
- Server Actions
- Module splitting
- Lazy-loading on the client (and server!)
- AsyncLocalStorage
- Cloudflare Durable Objects
- Flight ESM fixture
- Aviation