function MeasureExample() { const [width, setWidth] = React.useState(0); const measuredRef = React.useCallback(node => { if (node !== null) { setWidth(node.getBoundingClientRect().width); } }, []); return (

Hello, world

The above header is {Math.round(width)}px wide.

);}