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.