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
{{ message }}
Repository navigation
How can I dispatch an epic action to a substore? #544
Dispatch an action from the child component that triggers the epic.
Expected Behaviour:
The epic triggers and creates a new action. Both the root reducer and the substore reducer should receive the new action.
Actual Behaviour:
The root reducer receives the new action, but the substore reducer does not!
Additional Notes:
What is the correct way to use epics and fractal stores together?
I noticed that the action, when dispatched to the substore, has a property like this: action['@angular-redux::fractalkey']
I found that I could set this property explicitly when creating the action to fix the issue.
This seems like it relies on some unpublished implementation detail of angular-redux, and I somehow feel like it defeats the purpose of epic/substore usage.
@rmorrise@mika1111 Since actions that are dispatched from component using WithSubStore decorator will append sub store path with '@angular-redux::fractalkey'. You can have other action to take the value of sub store path and epic could simply pass it along.
Activity
mika1111 commentedon Apr 2, 2019
+1 I am also wondering how to add epic to fractal store
milocosmopolitan commentedon Apr 9, 2019
@rmorrise @mika1111 Since actions that are dispatched from component using WithSubStore decorator will append sub store path with '@angular-redux::fractalkey'. You can have other action to take the value of sub store path and epic could simply pass it along.