Redux is composed of the following components:
- Action — Actions are payloads of information that send data from our application to our store. They are the only source of information for the store. We send them to the store using
store.dispatch(). Primarly, they are just an object describes what happened in our app.
- Reducer — Reducers specify how the application’s state changes in response to actions sent to the store. Remember that actions only describe what happened, but don’t describe how the application’s state changes. So this place determines how state will change to an action.
- Store — The Store is the object that brings Action and Reducer together. The store has the following responsibilities: Holds application state; Allows access to state via
getState(); Allows state to be updated via
dispatch(action); Registers listeners via
subscribe(listener); Handles unregistering of listeners via the function returned by