useStore

Function: useStore()

ts
function useStore<TState, TSelected, TUpdater>(store, selector): object
function useStore<TState, TSelected, TUpdater>(store, selector): object

Type Parameters

TState

TSelected = NoInfer<TState>

TUpdater extends AnyUpdater = AnyUpdater

Parameters

store

Store<TState, TUpdater>

selector

(state) => TSelected

Returns

object

current

Get Signature

ts
get current(): TSelected
get current(): TSelected
Returns

TSelected

Defined in

index.svelte.ts:10

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.