Inside a reducer's case, you call a function that throws (an invalid action payload). The dispatch happens inside a normal onClick handler with no error boundary involved. What happens?
function reducer(state, action) {
if (action.type === 'apply') {
return { ...state, total: compute(action.value) }; // compute throws
}
return state;
}