- 2. Created a dispatcher method This is the only way to change the state of the application.
- State is read-only The only way to mutate the state is to emit an action , an object describing what happened.
- Dispatcher is called along with the action type which indicates how the state has to be changed.
- We can now use any rendering logic to create a UI based on the state of the application and if any user actions needs to change the state, it has to go through dispatcher.
- 4. Created a method to subscribe for the state change This method is used when an app needs to listen to the changes happening to the state.
Read the full article, click here.
@OpenCoconut: “#Redux explained in 4 simple steps, good #tutorial by @narendra_shetty 👏 📚 #reactjs”
How I learnt Redux concepts — Crowdfire Engineering