Chapter 1. Introducing Redux
Figure 1.1. Flux specifies that data must flow in a single direction.
Figure 1.2. Redux isn’t part of any existing framework or library, but additional tools called bindings connect Redux with React. Over the course of the book you’ll use the react-redux package for this.
Figure 1.3. A simple mockup of a profile page. This page is backed by two main pieces of data: the total post count and the list of post objects in the user’s activity feed.
Figure 1.4. A look at how data flows through a React/Redux application. We’ve omitted a few common pieces such as middleware and selectors, which we’ll cover in depth in later chapters.
Figure 1.5. An abstract representation of a reducer’s function signature. If this diagram looks simple, that’s because it is! Reducers are meant to be simple functions that compute a result, making them easy to work with and test.
Figure 1.6. Visualizing a reducer hard at work. It accepts as input an action and the current state. The reducer’s only responsibility is to calculate the next state based on these arguments. No mutations, no side-effects, no funny business. Data in, data out.