ZeeCoder / use-resize-observer

A React hook that allows you to use a ResizeObserver to measure an element's size.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merge ref and callbackRef

ZeeCoder opened this issue · comments

There's no good reason I can think of why the returned ref couldn't have been a callback ref.

That way the API gets simplified and usage is easier as users don't have to worry about whether their component will mount with a delay or not.

Actually, I can release this in the next minor, as I've only released callbackRef as an alpha release

On second thought I can't change the public API without a major version bump

Done in v7 alpha