https://kentcdodds.com/blog/the-state-reducer-pattern-with-react-hooks put logic in custom hook return methods to change the custom hook state use useReducer