For the useFetch hook I would recommend using a useReducer because the state is close related in each action and instead of having flags for the loading part, doing a state machine, check this article about it for me was a game changer: kentcdodds.com/blog/stop-using-isl...
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.
Great article, thanks for posting!
For the useFetch hook I would recommend using a useReducer because the state is close related in each action and instead of having flags for the loading part, doing a state machine, check this article about it for me was a game changer: kentcdodds.com/blog/stop-using-isl...