DEV Community

Discussion on: How to make a custom Debounce hook in react js

Collapse
 
loucyx profile image
Lou Cyx • Edited

The linter doesn't know how are you using your code so it gives you those warnings, if you use it as I said (first call of the curried version outside the component, second inside) it works exactly the same as a regular hook. Linters are there to help, but they aren't silver bullets, you have to understand the reason for the warnings and errors you get.