TanStackStore v0
Auto

useStore

Function: useStore()

Call Signature

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

Defined in: index.svelte.ts:10

Type Parameters

TState

TSelected = NoInfer<TState>

Parameters

store

Store<TState, any>

selector?

(state) => TSelected

Returns

object

current

ts
readonly current: TSelected;
readonly current: TSelected;

Call Signature

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

Defined in: index.svelte.ts:14

Type Parameters

TState

TSelected = NoInfer<TState>

Parameters

store

Derived<TState, any>

selector?

(state) => TSelected

Returns

object

current

ts
readonly current: TSelected;
readonly current: 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.