You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/effects/api.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ You can see this action as a lifecycle hook, which you can use in order to execu
26
26
@Effect()
27
27
init$=this.actions$.pipe(
28
28
ofType(ROOT_EFFECTS_INIT),
29
-
map(_=>...)
29
+
map(action=>...)
30
30
);
31
31
```
32
32
@@ -45,6 +45,31 @@ Usage:
45
45
exportclassFeatureModule {}
46
46
```
47
47
48
+
### UPDATE_EFFECTS
49
+
50
+
After feature effects are registered, an `UPDATE_EFFECTS` action is dispatched.
51
+
52
+
```ts
53
+
typeUpdateEffects= {
54
+
type:typeofUPDATE_EFFECTS;
55
+
effects:string[];
56
+
};
57
+
```
58
+
59
+
For example, when you register your feature module as `EffectsModule.forFeature([SomeEffectsClass, AnotherEffectsClass])`,
60
+
it has `SomeEffectsClass` and `AnotherEffectsClass` in an array as its payload.
61
+
62
+
To dispatch an action when the `SomeEffectsClass` effect has been registered, listen to the `UPDATE_EFFECTS` action and use the `effects` payload to filter out non-important effects.
0 commit comments