Skip to main content

Function: withRedux()

withRedux<Spec, Input, StateActionFns, PublicStoreActionFns>(redux): SignalStoreFeature<Input, EmptyFeatureResult & object>

Defined in: libs/ngrx-toolkit/src/lib/with-redux.ts:360

Type Parameters

Spec extends ActionsFnSpecs

Input extends SignalStoreFeatureResult

StateActionFns extends ActionFnCreator<Record<string, Payload>> | ActionFnCreator<ActionsFnSpecs> = ActionFnsCreator<Spec>

PublicStoreActionFns extends ActionFnCreator<Record<string, Payload>> | ActionFnCreator<ActionsFnSpecs> = PublicActionFns<Spec>

Parameters

redux

redux

properties do not start with with since they are not extension functions on their own.

no dependency to NgRx

actions are passed to reducer and effects, but it is also possible to use other actions. effects provide forAction and do not return anything. that is important because effects should stay inaccessible

actions

Spec

effects

EffectsFactory<StateActionFns>

reducer

ReducerFactory<StateActionFns, WritableStateSource<Input["state"]>>

Returns

SignalStoreFeature<Input, EmptyFeatureResult & object>