Effects can be used to execute side effects (actions, http requests and other operations) upon action events. First, install the package:
Next, to register effects, simply run
AkitaNgEffects.forRoot() and register the effect classes:
An action always holds a type property and an optional payload.
You can use the actions to act upon any action event:
This parameter dictates if the effect can dispatch an action. Set
true if you want the effect to dispatch an action. Set to
false or omit if the effect should not dispatch any action.
Possible use case
This is one possible use case for an action inside a guard to initialize fetching of a navigation.
You can also use them in components in order to fetch data.