rivetkit-client-react

Installation
Summary

React client for connecting to Rivet Actors with hooks and realtime state management.

  • Create typed hooks with createRivetKit() and connect to actor instances using useActor() with keys and optional parameters
  • Subscribe to actor events with useEvent() and monitor connection lifecycle through connStatus and error states
  • Use createClient() for stateless one-off calls, actor discovery methods (get, getOrCreate, create, getForId), and low-level HTTP/WebSocket access
  • Supports compound array keys for hierarchical actor addressing, automatic environment variable configuration, and explicit error handling via ActorError
SKILL.md

RivetKit React Client

Use this skill when building React apps that connect to Rivet Actors with @rivetkit/react.

First Steps

  1. Install the React client (latest: 2.3.0-rc.5)
    npm install @rivetkit/react@2.3.0-rc.5
    
  2. Create hooks with createRivetKit() and connect with useActor().

Error Handling Policy

  • Prefer fail-fast behavior by default.
  • Avoid try/catch unless absolutely needed.
  • If a catch is used, handle the error explicitly, at minimum by logging it.

Getting Started

Related skills
Installs
5.5K
GitHub Stars
14
First Seen
Jan 26, 2026