DEV Community

M.Pineda
M.Pineda

Posted on

React Function called twice

I am using useReducer to update a state in react. I want to increase the quantity by 1. But when I press the button it is being called two times making it go by 2. Sorry if I didn't explain myself correctly.

Top comments (0)