The reducer is at the center of how Redux manages state. In this lesson we’ll create a reducer function and see how Redux takes in state and actions and returns updated state. We’ll write and run unit tests using Jest to verify that our reducer function is working as expected.
I think this episode should be moved to before Episode 4 (creating a redux store), since the todo reducer code is used there.
Right, this episode needs episode should be after 3 and before 4.
This video would really benefit from at least a basic initial explanation of what a reducer/action/etc does. I've used react/redux a bit already but if I was a newcomer I think I'd be totally lost in the first half of this video.
There is a parenthesis missing from the video, test code should be:
describe('Todo Reducer', () => { test('returns a state object', () => { const result = reducer(undefined, {type:'ANYTHING'}) expect(result).toBeDefined() })
There is a parenthesis missing from the video, test code should be:
describe('Todo Reducer', () => { test('returns a state object', () => { const result = reducer(undefined, {type:'ANYTHING'}) expect(result).toBeDefined() })
It looks like it's just past the edge of what's visible in the editor. A missing paren would have caused the test to fail with a syntax error.