This is a demo of a React app that implements partial prerendering with React and Cloudflare Workers. It's meant to accompany this blog post. Live demo at https://react-ppr-workers.threepointone.workers.dev/
- A response stream is started from the eyeball worker
- It immediately streams a prerendered html app "shell"
- The request is passed on to the a smart placed worker near the database
- React kicks in and starts rendering
- The app renders and generates html / script tags with out-of-order streaming
- This is streamed back to the user through the eyeball
npm install- Setup a "pokemon" database on Cloudflare D1 with
init.sql npm startto run the dev server(s)npm run deployto deploy to Cloudflare Workers
Original repo by @rauchg