DEV Community

Discussion on: How To Efficiently Update React State For Multiple DOM Inputs Using the useReducer() Hook

Collapse
 
kylewcode profile image
Kyle Williams

I wanted to avoid having more actions than was necessary. The first solution was an action for each input and the other a single action to handle them all. The second solution is better because it make the code easier to read and follow. If there's a problem with the logic, I'd just have to look under a single action to debug.