Enhanced version of useMeasure that provides real-time measurements during animations.
Use for components that don't sit within the component hierarchy but could be animated.
(for examples portal elements; menus, tooltips)
Unlike the standard useMeasure hook which relies on ResizeObserver (which doesn't trigger
during CSS transform animations), this hook actively monitors element bounds using
requestAnimationFrame and CSS animation/transition events.
Enhanced version of useMeasure that provides real-time measurements during animations.
Use for components that don't sit within the component hierarchy but could be animated. (for examples portal elements; menus, tooltips)
Unlike the standard useMeasure hook which relies on ResizeObserver (which doesn't trigger during CSS transform animations), this hook actively monitors element bounds using requestAnimationFrame and CSS animation/transition events.