Hacker News new | ask | show | jobs
by foolbiter 2379 days ago
Nope. 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.
1 comments

I like it. How did I miss this most obvious and simple solution?