useState vs useReducer

When to Use Which

useStateuseReducer
simple values: toggle, input, countermany related values or many ways to update
update logic inside event handlersupdate logic in one reducer function (easy to test)
next state depends on the previous state in complex ways