So in the 1st part we saw a story for understanding about redux. So what redux basically does is that it takes the data from other screens and those data can afterwards be rendered in other screens without any sort of prop drilling. So, it basically puts up the state to the steroid form.
Redux: Three Principles
Store: The global state of your application is stored in a store from where the data flows through different screens and you can have access to them.
Actions: The only way to change the state is to emit an action. In the example story of part 1, we saw that, your sister tells Clark to give the pizza then only Clark gives it to her. This 'call for pizza' is actually an action.
Reducer: This is basically the function which is fired once an action is emmited. In the story, when your sister calls for the pizza, Clark checks the box and if there is a pizza for her he returns it. This whole thing that Clark is doing is an example of a reducer. This is kind of the brain of the redux.
Top comments (0)