Using useReducer but forgetting to return a new state in the reducer function
A common mistake when using useReducer in React is forgetting to return a new state object from the reducer function, which can lead to unexpected behavior and rendering issues. The….