4 ms·
I thought the idea was that you'd have layers of actions so you have a top level handler of some sort that would then dispatch a contained-within-the-primnary-a
by mst 5y ago
I thought the idea was that you'd have layers of actions so you have a top level handler of some sort that would then dispatch a contained-within-the-primnary-action component-scoped action and then pull the new component data back into the global store.
(apologies for the lumpy phrasing, insomnia is a pain)
- aranchelk 5y agoThat may be best practice, I'm not sure. Regardless, you can imagine as a result of that style of coding, any changes to the type of your components state will require at least some changes within the component, changes to one or more of those layers of action handlers, and a change to the initial/default instance of your applications model. I'm absolutely not an authority on Elm architecture, I just know that my experience doing stuff like forms with validation really sucked.
- mst 5y agoI'm not sure an optimal implementation of the pattern requires onerous changes but it seems like one of those things where even if I'm right about said optimal implementation, learning how to get all the details right such that you get to that state is exceedingly non-trivial and the world seems to be divided into people who've already had the relevant "aha" moments and for whom it's now Just Obvious ... and people like us, who know just enough to blow both feet off ;)