TinyBase logoTinyBase β

resolveStore

The resolveStore function is used to get a reference to a Store object from a Provider context, or have it passed directly.

resolveStore(storeOrStoreId?: MaybeGetter<undefined | StoreOrStoreId>): () => Store | undefined
TypeDescription
storeOrStoreId?MaybeGetter<undefined | StoreOrStoreId>

The Store, its Id, or a getter returning either.

returns() => Store | undefined

A getter function returning the Store, or undefined.

Since

v8.1.0