During the development process, you often need to know who and how changed the state. A mutating state through the issuance of actions allows you to answer these questions.
Actions are a payload of information that tells the store how to modify it. This information is presented in the form of simple javascript objects that allow you to register, organize and store this information. Since the whole story is "remembered", you can later reproduce the entire chain of actions for debugging or testing. Together with a tool like Redux DevTools , it makes the development process very simple and amazing. Since all changes to the repository are logged on the monitor, you can see how and when the state was changed at each step. Moreover, you can return or go through the chain of actions.
Another advantage that all mutations are centralized in one place is the fact that it is easier to control the condition. This ensures that all mutations occur one after another in a strict order, and no callbacks can make the application behavior unstable. It also allows you to save in one place functionality that is common to some actions, or, in other words, to use middlewares.
source share