useElementSize

Why?
Sometimes there is a need to read the size of a
window
or a specific
HTML element
. The most common reason for that is to display a particular element in an application based on the size of a device.
This is a perfect example of logic that will repeat itself in many applications, so it is worth to encapsulate it in a hook.
Usage
Implementation