React hooks has changed the way of declaring state from the language level to the framework level, so many existing front-end codes (timeout/interval/debounce) need to be repackaged and encapsulated in hooks for this reason.
P.S. Some are indeed strongly related to react and ui. It is indeed necessary to encapsulate, but rewriting just to be compatible with hooks makes me feel bad.
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.
React hooks has changed the way of declaring state from the language level to the framework level, so many existing front-end codes (timeout/interval/debounce) need to be repackaged and encapsulated in hooks for this reason.