Home
Using Smart NgRX
Demo Walkthrough
API
@smarttools/smart-ngrx / Function

effectsFactory

Generic types:T

The effects factory creates a new set of effects for the Action source provided and calls the service represented by the InjectionToken provided.

See Also

Presentation

function effectsFactory(
  feature: string,
  entityName: string,
  effectsServiceToken: InjectionToken<EffectService<T>>,
): Record<EffectsFactoryKeys, FunctionalEffect>;

Returns

Record<EffectsFactoryKeys, FunctionalEffect> -

The NgRX effects for the source provided

Parameters

NameTypeDescription
feature
string

the feature name this effect is being run for

entityName
string

the entity within the feature this effect is being run for

effectsServiceToken
InjectionToken<EffectService<T>>

The token for the service that