npx skills add ...
npx skills add rivet-dev/skills --skill rivetkit-client-react
npx skills add rivet-dev/skills --skill rivetkit-client-react
RivetKit React client guidance. Use for React apps that connect to Rivet Actors with @rivetkit/react, create hooks with createRivetKit, or manage realtime state with useActor.
Use this skill when building React apps that connect to Rivet Actors with @rivetkit/react.
createRivetKit() and connect with useActor().try/catch unless absolutely needed.catch is used, handle the error explicitly, at minimum by logging it.See the React quickstart guide for getting started.
Use the JavaScript client for raw HTTP and WebSocket access:
Use the JavaScript client on your backend (Node.js/Bun). See the JavaScript client docs.
Keys uniquely identify actor instances. Use compound keys (arrays) for hierarchical addressing:
Don't build keys with string interpolation like "org:${userId}" when userId contains user data. Use arrays instead to prevent key injection attacks.
createRivetKit() (and the underlying createClient() instance) automatically read:
RIVET_ENDPOINTRIVET_NAMESPACERIVET_TOKENRIVET_POOLDefaults to http://localhost:6420 when unset. RivetKit runs on port 6420 by default.
Endpoints support URL auth syntax:
You can also pass the endpoint without auth and provide RIVET_NAMESPACE and RIVET_TOKEN separately. For serverless deployments, use your app's /api/rivet URL. See Endpoints for details.
Package: @rivetkit/react
createRivetKit - Create hooks for ReactuseActor - Hook for actor instancesIf you need more about Rivet Actors, registries, or server-side RivetKit, add the main skill:
Then use the rivetkit skill for backend guidance.