Skip to content

@sqlrooms/room-shell / createRoomStore

Function: createRoomStore()

createRoomStore<PC, RS>(stateCreator): object

Create a room store with custom fields and methods

Type Parameters

Type Parameter
PC
RS extends RoomState<PC>

Parameters

ParameterType
stateCreatorStateCreator<RS>

Returns

object

The room store and a hook for accessing the room store

NameType
roomStoreStoreApi<RS>
useRoomStore<T>(selector) => T