What is Redux?
According to the Redux documentation at: http://redux.js.org/, Redux is "a predictable state container for JavaScript apps". To explain redux in detail, let's take a look at the story of flux, an application architecture built by Facebook.
Flux
React is all well and good for a small application such as the ToDo list or the blog we built in the preceding chapter, except for an application such as Facebook. Facebook has hundreds of stateful React components that work to render the web application. In our blog, each React component has its state, and each stateful component makes a network request to fill these states with data.
Once parent components get the data, it will get passed to child components as props. However, the child component can have its own states too. Likewise, there can be two or more parent components in the same level that require the same data for the states. React's one-way data flow has a severe problem here. If the data is passed to the child component...