3 ms·
Once you start using React for some time, the benefits of these hooks becomes obvious. Think of them as small utilities, like lodash, or standard lib. Reusable
by hakanderyal 4y ago
Once you start using React for some time, the benefits of these hooks becomes obvious. Think of them as small utilities, like lodash, or standard lib. Reusable snippets of code that you occasionally need.
- ricardobeat 4y ago"Reusable" within very limited scopes. Every React project ends up with tons of custom hooks that are only used in one or two places. I don't think they can be compared to generic utilities like that.
- hakanderyal 4y agoYou are right, I was talking about useHooks project specifically, which includes utility hooks like useDebounce, useLocalStorage etc.