10 ms·
Stuff like https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-... If you're not a
by dumbmatter 7y ago
Stuff like https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-...
If you're not aware of that, it is very tempting to use `useRef`, which is what I have often seen. Before hooks, we did not have the temptingly-named footgun `useRef` for this scenario (although we did have other footguns for other scenarios, and overall I love hooks).