Redux Reducers Primer
Jul 24, 2017 · 2 min read
As mention in my last post, Redux is based on 3 key principles. One of the principles states that the application state is modified by pure functions. These pure functions in Redux are called reducers.
For a function to be considered pure, it must follow the following two rules.
- The function’s output evaluates to the same value for the same given set of arguments, and does not access or modify any state outside the function scope.
- The functions does not produce any observable side effects.
