TanStackStore v0
Auto

useStore

Function: useStore()

Call Signature

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

Defined in: index.ts:11

Type Parameters

TState

TSelected = NoInfer<TState>

Parameters

store

Store<TState, any>

selector?

(state) => TSelected

Returns

TSelected

Call Signature

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

Defined in: index.ts:15

Type Parameters

TState

TSelected = NoInfer<TState>

Parameters

store

Derived<TState, any>

selector?

(state) => TSelected

Returns

TSelected

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.