Skip to content

Reducers with mutli dependencies #3094

Closed Answered by mbrandonw
Colin-Fresco asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Colin-Fresco, I can't say I 100% understand the situation you are describing, but if it all boils down to asking if it's ok for a dependency to encapsulate other dependencies with logic, then yes that is typically OK.

However, there are some things to be aware of:

  • First, the more logic you move out of your reducer and into your dependency the less the TestStore will be able to help you write exhaustive tests. You will have more responsibility to make sure you are testing the true behavior of your features. You may want to even start writing some test for the dependency itself as an isolated unit, separate from your reducer features. We do this for the AppStorageKey and FileStorageKey

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Colin-Fresco
Comment options

Answer selected by Colin-Fresco
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