There are 3 main PILLARS within REDUX.
- State
- Actions
- Reducers
- The state of my application is described as an object.
- To change something in the state, it is necessary to send an action, which are also objects. They can be compared to breadcrumbs describing what happened.
- To combine the actions with the state to be changed, the 3rd pillar “the reducer” is needed.
- The state of your ENTIRE app is stored in a SINGLE “store”.
- Actions are the only source of information for the store. You send them to the store using “store.dispatch()”.
- Actions are plain JavaScript objects. An action must have a “type” property indicating the type of action to perform. Types are usually defined as constant strings.
- Besides the type, the rest of the structure of the action objects depends on you.