Here’s the Deal
Slant is powered by a community that helps you make informed decisions. Tell us what you’re passionate about to get your personalized feed and help others.
"Official Flux-Like implementation" - their own docs. They explain it better than I ever could, but I love separation of concerns, how modular it is and how everything can be shared and feed into each other without being concerned over how, where etc. https://vuejs.org/v2/guide/state-management.html#Official-Flux-Like-Implementation See More
Redux is great for state that's required in many disparate parts of the DOM, but frequently you see projects use it to hold all state, instead of just using props. It might be good if more could be done in the official docs to guide developers in when not to use it! See More
Reducers are pure functions that returns the next state based on the previous state and an action (describing what should be changed). Since they are pure functions, they return a new state object instead of modifying the existing state. This ensures that it doesn't affect anything outside of the function's scope, making it free from unintended side effects and also makes debugging easier. See More
In Redux, the state of your application is held in a single object. The only way to change the state is to emit an action describing the change — there is no way to mutate state from the view, callbacks, or anywhere else. This makes the state of your application predictable and objective, and reduces the chances of any unintended state mutation by a callback somewhere else in your code. See More