Working Redux application
Now that we have the terms down, we can take a quick look at the basic steps involved in running the Redux app you'll be building in the future.
The application works according to the idea of unidirectional data, as we mentioned earlier.
During initialization (the first time the application is launched), the root reducer creates a store. The store calls this reducer only once and records the value it returns as the initial state. During the initial rendering, application components use the current state written to the store. They also subscribe to store updates to immediately learn about state changes.
As the application continues to run, the following happens. Let's say the user clicks on a button. In this case, an action is generated using code and sent to the storage. The storage again runs the reducer with the state stored in it and the action received. As a result, the changed value of the state is saved as a new one. The storage also notifies the components subscribed to the changes that changes have taken place. In turn, the components look to see if the parts of the state they need have changed. Finally, if changes have taken place, the component calls rendering to display the new data.