Code QuizIntermediate Dispatching Actions
Calling the reducer directly instead of dispatching an action.
Codejavascript
const [state, dispatch] = useReducer(reducer, { count: 0 });
<Button
title="Add"
onPress={() => reducer(state, { type: 'increment' })}
/>What is the bug in this code?