What is Redux?
3 Principles of REDUX
Using these three principles allow us to know exactly where and how the state changes. It also allows us to use the state in any part of the app.
1. There is one and only one source of truth for the app
2. State is read only
type key value pair. An action describes how the state will change. By using an action to describe changes, we know exactly what is happening in the app when changes occur.
3. State can only be modified with reducers
A reducer is a function that takes in two arguments, an action and the previous state, and returns the modified state.