TinyBase logoTinyBase β

useStore

The useStore hook returns the default Store from the current Provider context (or a named Store if an Id is provided).

useStore(id?: string): Store | undefined
TypeDescription
id?string

An optional Id of a named Store in the Provider context.

returnsStore | undefined

The Store, or undefined if not found.

Since

v8.1.0