Joined 10 years ago
With this declarative approach you have a really clear idea of what's happening in terms of both side effects and state just by looking at the reducer.
Once again, if you're happy with putting them in action creators, it's completely fine. It's a matter of taste I guess and you should probably use what you're the most comfortable with.
I took this idea from re-frame in clojurescript. When going back to JS and redux I thought I missed this approach, so I made this small thing.
With this declarative approach you have a really clear idea of what's happening in terms of both side effects and state just by looking at the reducer.
Once again, if you're happy with putting them in action creators, it's completely fine. It's a matter of taste I guess and you should probably use what you're the most comfortable with.
I took this idea from re-frame in clojurescript. When going back to JS and redux I thought I missed this approach, so I made this small thing.