react-hook-dimensions
React Hook to get DOM Element `BoundingClientRect` together with the `page offset` snapshot, that covers all your needs. What makes the package different - You can trigger an update when you really need it.
set-elements
Set a group of element's attribute or client rect value to that of another element's value