I believe I\'m copying the Todo tutorial pretty much line for line, I am getting this error:
Error: Reducer \"addReport\" returned undefined during in
You are missing the default
of the switch case.
default: {
return {
...state
}
}
Redux won't play along like a nice kid if you forget to do it!
Or alternatively, you can explicitly return at the end the initial state:
If the state passed to the reducer is undefined, you must explicitly return the initial state.