Skip to content
Discussion options

You must be logged in to vote

Generally, you should hold on to all of your app's dependencies in the root AppEnvironment and pass them down the hierarchy to the child domains that need them.

If you don't do this, you can make it harder to control your environment in tests - for example, whilst you can always directly test any feature domain and inject your dependencies using a TestStore, there are sometimes cases where you need to test a feature domain's integration into a parent domain - when you do this you only have control over the parent domain's environment and not the direct child environment, as this would be created by the pullback that integrates the child reducer into your parent.

For example:

struct Parent…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ivangodfather
Comment options

You must be logged in to vote
3 replies
@lukeredpath
Comment options

@clayellis-cricut
Comment options

@stephencelis
Comment options

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