Skip to content
Source
Sign inSign up
TanStack/store
Open History to see the last commit

usestore.md

76 lines1.1 KB

Function: useStore()

Call Signature

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

readonly current: TSelected;

Call Signature

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

readonly current: TSelected;