Structuring Reducers

    Redux puts some basic constraints on how that write logic function should work. As described in Reducers, it has to have a signature of , is known as a reducer function, and must be pure and predictable.

    Some of these concepts are already described elsewhere in the Redux documentation. Others are generic and applicable outside of Redux itself, and there are numerous existing articles that cover these concepts in detail. These concepts and techniques form the foundation of writing solid Redux reducer logic.

    Prerequisite Concepts

    It's also important to note that some of these suggestions may or may not be directly applicable based on architectural decisions in a specific application. For example, an application using Immutable.js Maps to store data would likely have its reducer logic structured at least somewhat differently than an application using plain Javascript objects. This documentation primarily assumes use of plain Javascript objects, but many of the principles would still apply if using other tools.

    Reducer Concepts and Techniques