A common solution to the problem of managing complex state is the idea of a store: a single source of truth that keeps all of the data of our app's state. Once we have that central location—the store—we can reason about state a lot easier, because now it is only a matter of sending the state data to those components that need to have it at any time in the app's life cycle.
To make the state updates simpler, we need to limit the ways in which these updates can be made. This is where one-way data flows come in. With one-way data flows, we specify rules on exactly how data can flow inside our app, which means that there are now only so many expected ways in which data (state) can flow through our apps, making it easier to reason about state and debug state when needed. This approach is also a great time...