Custom React hook that retrieves the offset height of a referenced element.
This hook listens for resize events on the specified element and updates
the offsetHeight state whenever the height of the element changes.
The offset height includes padding, scrollbars, and borders,
but excludes margins.
Custom React hook that retrieves the offset height of a referenced element.
This hook listens for resize events on the specified element and updates the
offsetHeight
state whenever the height of the element changes. The offset height includes padding, scrollbars, and borders, but excludes margins.Example