3 ms·
Does this continuously clearInterval on every render?
by andrewstuart 7y ago
Does this continuously clearInterval on every render?
- foolbiter 7y agoNope. Since the dep array is empty, the effect only runs once after the first render, & the cleanup function returned from the effect only runs on unmount.
- andrewstuart 7y agoI like it. How did I miss this most obvious and simple solution?