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

injectStore-1.md

53 lines828 Bytes

function injectStore<TState, TSelected>(
   store, 
   selector?, 
options?): Signal<TSelected>;

Defined in: packages/angular-store/src/injectStore.ts:20

Deprecated alias for injectSelector.

Type Parameters

TState

TState

TSelected

TSelected = NoInfer<TState>

Parameters

store

SelectionSource<TState>

selector?

(state) => TSelected

options?

CompatibilityInjectStoreOptions<TSelected>

Returns

Signal<TSelected>

Example

readonly count = injectStore(counterStore, (state) => state.count)

Deprecated

Use injectSelector instead.