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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access