← React Intermediate Questions - Set 3 Q24
React Intermediate Questions - Set 3
1 2 3 4
useLayoutEffect(() => { const h = box.current.getBoundingClientRect().height; setHeight(h); // applied before the browser paints }, []);