If there’s one thing we hope you’ve learned on Point-Free it’s that when you have complimentary concepts, such as state and action or struct and enum, as soon as you find something handy for one concept you should immediately look for the equivalent on the other concept. In general that’s just a great principle to live by. And currently our ViewStore
is kind of lopsided, in that we are only focusing on the application state when we use a view store. That’s understandable since the whole motivation for the view store was to minimize what state our views know about in order to improve performance, but there’s this other side of our application: the actions!
By extending our notion of the view store to also account for the actions that a view cares about we will be able to further chisel away at the domain that the view has access to. To see why that would be useful, let’s take a look at the CounterView
again.