Redux basic flow
Hemant Saraf edited this page Oct 18, 2021
·
10 revisions
An obj having the state of the application (global store) [although each Comp. can have their local store]
Our component can't directly change the state of our store, it does this by dispatching an Action obj, which are present in Action creator function
Action is an obj. with two prp. TYPE and PAYLOAD
(payload being optional)
It is present with component, it helps ACTION REACH REDUCER
These are pure functions, i.e. don't pollute their scope (no async tasks) and do changes immutably. They consume ACTIONS and based on TYPE of action they make changes in store. They take 2 arguments 1. part of store (thats why we combine reducer) 2. relevant actions