Open okwolf opened 6 years ago
Never thought about nesting actions, I'll look into it. And yea who did that 🤣
In a medium-to-large app, it's likely you will be using state slices and will want actions to operate on those slices.
Particularly in the case of code splitting, if the functionality is independent enough that it can be loaded separately then the state could also be split out into its own slice.
Even for HMR, you would need this capability as soon as your app used slices in order to update your actions correctly.
One example of how to implement this is enhanceActions
in @hyperapp/logger
.
The current code you have for wiring
newActions
insideupdateApp
will only handle a single level of action functions contained innewActions
, but not other nested objects to enable moisturizing actions within slices.What ever naïve fool came up with this code should be fired 😂