How it works...

  1. The first action type that the reducer encounters is increment(10) which will increment the accumulator by 10. Because the initial value of the accumulator is 0, the next current value will be 10
  2. The second action type tells the reducer function to decrement the accumulator by 5. Thus, the accumulator's value will be 5.
  3. The last action type tells the reducer function to increment the accumulator by 3. As a result, the accumulator's value will be 8.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.80.123