Skip to content

Store action, state and environment type declaration #397

Answered by stephencelis
ferologics asked this question in Q&A
Discussion options

You must be logged in to vote

There are a few reasons we like defining the domain of a feature outside of its view:

  • Because the view depends on the domain and the domain does not depend on the view, this means you can extract the domain of a feature into its own module that can be tested in isolation.
  • By decoupling the domain from the view it means you can reuse a domain across many different views. This could be as simple as skinning a feature differently (maybe preparing a new view to be A/B tested), or as complex as defining completely separate macOS and iOS and tvOS views for the same feature.
  • While a lot of the time there are entry points for a feature's root view that contains a store of root state and root act…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
7 replies
@AlexisQapa
Comment options

@AlexisQapa
Comment options

@ferologics
Comment options

@ferologics
Comment options

@AlexisQapa
Comment options

Comment options

You must be logged in to vote
2 replies
@ferologics
Comment options

@RabugenTom
Comment options

Comment options

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

Answer selected by ferologics
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