I have implemented useReducer to dispatch the action based on the action type and each time I\'m updating a state variable based on the action type but always I\'m getting a