Skip to content
Discussion options

You must be logged in to vote

To make the parent send actions to the child, the parent feature should be composed with the child feature.

For example you can add a case child(ChildFeature.Action) to the parent actions. Make the parent reduce func or body run the child with ifLet or Scope. Then In your parent refresh action return Effect(value: .child(.refresh)) instead of .none.

There are multiples ways of doing this depending on the relation of you features. If they are unrelated you could have a third reducer that compose your features and relay the action

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vvisionnn
Comment options

Answer selected by vvisionnn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants