Redux Reducers Primer

Markus Daehn
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.

  1. 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.
  2. The functions does not produce any observable side effects.

Keep the story going. Sign up for an extra free read.

You've completed your member preview for this month, but when you sign up for a free Medium account, you get one more story.
Already have an account? Sign in

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade