useStore

Function: useStore()

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

Type Parameters

TState

TSelected = NoInfer<TState>

TUpdater extends AnyUpdater = AnyUpdater

Parameters

store

Store<TState, TUpdater>

selector

(state) => TSelected

Returns

TSelected

Defined in

index.ts:11

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.