re: Why i won't use React Hooks VIEW POST

FULL DISCUSSION
 

Today I found a good use case for react hooks. I needed a way to execute a function every 10 seconds. So, I used a custom hook called useInterval, which can be found on npm as “use-interval”. Works super well. Just pass it a function and the delay and bang. After the component unmounts the interval clears 😊

code of conduct - report abuse