Skip to content

@sqlrooms/room-store / createRoomStore

Function: createRoomStore()

createRoomStore<RS>(stateCreator): object

Create a room store with custom fields and methods

Type Parameters

Type Parameter
RS extends BaseRoomStoreState

Parameters

ParameterType
stateCreatorStateCreator<RS>

Returns

object

The room store and a hook for accessing the room store

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