The Redux Pattern
What exactly is the redux pattern?
Redux is a state management javascript library similar to facebook's Flux library and is popularly used alongside frameworks like Angular and React.
What this means in simpler terms is that Redux can manage all your application state data all from a single source, you would not have several instances of the same data with different values.
It takes advantage of object immutability features to make sure your data are unique, process your data with pure functions called reducers, and combined with some defined actions produces your new state that will be stored in the Redux store, which you can access.
You can not access the reducer directly, you have to dispatch actions, and you also cannot access the store directly, you have to use selectors, there you have it, that is the Redux pattern.
Do we always need to use Redux?
Not exactly, there are some applications that do not necessarily have to implement the redux style especially if they are simple projects.
There is a popular quote from the creator of Redux - "You might not need Redux"
6
