https://github.com/enjikaka/react-service-worker-components
React Server Components, but they are rendered in a Service Worker...
https://github.com/enjikaka/react-service-worker-components
react react-server-components service-worker
Last synced: 2 months ago
JSON representation
React Server Components, but they are rendered in a Service Worker...
- Host: GitHub
- URL: https://github.com/enjikaka/react-service-worker-components
- Owner: enjikaka
- Created: 2025-01-16T15:11:02.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-16T16:24:27.000Z (5 months ago)
- Last Synced: 2025-04-11T23:40:36.254Z (2 months ago)
- Topics: react, react-server-components, service-worker
- Language: JavaScript
- Homepage: https://rswc.jeremy.no
- Size: 37.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-service-worker-components
A demo of rendering React Server Components in a Service Worker.
I've previously done some [experiments rendering HTML (web components) with data from a JSON API in the Service Worker](https://github.com/enjikaka/tidal-sdk-demo-app), to avoid additional services on the server aside of the main API. Surely, it has it's pros and cons. One nice thing is that you can still "server side render" user-unique data that cannot be cached on your server, but can be locally in the server worker after genration - provided that your API provides cache headers for API resources so you know when to invalidate. You can also utilize that most clients todays are thick rather than [thin](https://en.wikipedia.org/wiki/Thin_client), and use their processing power instead of paying for your [expensive hipster server software](https://vercel.com/).