thchia opened this issue 6 years ago · 0 comments
Hook to simplify creation and cleanup of setInterval:
function MyComponent() { useInterval(() => { // do something every 1s }, 1000) return <div>...</div> }
https://github.com/thchia/useInterval