React hook that watches for updates and returns element size.
handlerFn() when element size changed with instance of DOMRectReadOnly.elementRef.current does not contain reference to HTMLElement. reinitInEffect forces immediate re-render to apply element sizes, expected to have a valid reference at the time of re-render.Example on codesandbox.io.