examples/react-render/README.md
Note: This is the Render-optimized version of the react example. It adds a production HTTP server, Vite build, and a
render.yamlBlueprint for deploying to Render.
Demonstrates React frontend integration with Rivet Actors.
git clone https://github.com/rivet-dev/rivet.git
cd rivet/examples/react
npm install
npm run dev
@rivetkit/react hooks for type-safe actor communicationThis example demonstrates React frontend integration with Rivet Actors:
src/actors.ts): Minimal counter with increment action and newCount eventsrc/server.ts): Hono app routing /api/rivet/* to the registry handlerfrontend/app/App.tsx): useActor hook with event subscriptionexamples/react-render if deploying from the monorepo.| Variable | Description |
|---|---|
RIVET_ENDPOINT | Backend endpoint URL from your Rivet Cloud project |
RIVET_PUBLIC_ENDPOINT | Public endpoint URL from your Rivet Cloud project |
RIVET_ENVOY_VERSIONis automatically derived from Render'sRENDER_GIT_COMMIT— no manual bump needed per deploy. Set it explicitly to override.
MIT