Re:Thinking in React Hooks
by foolbiter on Friday December 13, 2019 @01:45AM
(#21779624)
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.
[ Parent
| on HN ]
Re:Thinking in React Hooks
by andrewstuart on Friday December 13, 2019 @03:52AM
(#21780108)
I like it. How did I miss this most obvious and simple solution?