Skip to content

ChatRequestStore

Defined in: libs/ccs-chat-user-client/src/react/stores.ts:41

One request: run() loads (again), mutate() updates the data locally, e.g. from a realtime event.

T

new ChatRequestStore<T>(load): ChatRequestStore<T>

Defined in: libs/ccs-chat-user-client/src/react/stores.ts:42

() => Promise<T>

ChatRequestStore<T>

Store<ChatRequestState<T>>.constructor

readonly subscribe(listener): () => void

Defined in: libs/ccs-chat-user-client/src/react/stores.ts:16

Listener

() => void

Store.subscribe


readonly getSnapshot(): ChatRequestState

Defined in: libs/ccs-chat-user-client/src/react/stores.ts:21

ChatRequestState

Store.getSnapshot


cancel(): void

Defined in: libs/ccs-chat-user-client/src/react/stores.ts:24

Ignore the result of any load in flight (e.g. the component unmounted or its inputs changed).

void

Store.cancel


run(): Promise<void>

Defined in: libs/ccs-chat-user-client/src/react/stores.ts:46

Promise<void>


readonly mutate(update): void

Defined in: libs/ccs-chat-user-client/src/react/stores.ts:57

(data) => T | undefined

void