You're totally right. If a custom hook is more complex, we definitely need to re-think it with useReducer.
Here we have a state and two methods (three with your example and the reset method).. but if the custom hook has x methods better to switch to the useReducer approach.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You're totally right. If a custom hook is more complex, we definitely need to re-think it with useReducer.
Here we have a state and two methods (three with your example and the reset method).. but if the custom hook has x methods better to switch to the useReducer approach.