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 id
of the room.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 a room and stops sync it with Zustand state.
roomId
: The id
of the room.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.
Connection state of the room.
The value can be : authenticating
, connecting
, open
, failed
, closed
or
unavailable
.