@liveblocks/zustand
provides you with Zustand
bindings for our realtime collaboration APIs, built on top of WebSockets. Read
our getting started guides to learn more.
The liveblocks
middleware lets you connect a Zustand state to Liveblocks
Presence and Storage features.
See different authentication methods in the createClient
method.
Mapping used to synchronize a part of your Zustand state with one Liveblocks Room presence.
Mapping used to synchronize a part of your Zustand state with one Liveblocks room storage.
Liveblocks extra state attached by the liveblocks.
Enters a room and starts syncing it with your Zustand state.
roomId
: The room’s ID.If this is the first time you’re entering the room, the room is initialized from
your local Zustand state (only for the keys mentioned in your storageMapping
configuration).
Leaves the current room and stops syncing it with Zustand state.
The Room
currently synced to your Zustand state.
Other users in the room. Empty when no room is currently synced.
Whether or not the room storage is currently loading.
Gets the current WebSocket connection status of the room.
The possible value are: initial
, connecting
, connected
, reconnecting
, or
disconnected
.
We use cookies to collect data to improve your experience on our site. Read our Privacy Policy to learn more.