Redux
Redux attempts to make state mutations predictable by imposing certain restrictions on how and when updates can happen.
Redux has three main part.
- The Main Store
- Reducers
- Actions
Store: This is whole application state acting as the database. The store is broken down into different states, which represent different types of data in the application.
Reducers: If the store is the database of the application, the reducers are the tables. A reducer is a pure function that accepts two arguments, the previous state and an action, and returns the new state.
Action: Actions represent payloads of information that are dispatched to the store from the application and are usually triggered by user interaction. An action is composed a type and a payload.