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

node_modules/.pnpm/@tanstack+react-store@0.6.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-store/dist/esm/index.d.ts:7

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.