Closed GreenGremlin closed 4 years ago
I've added a test to assert that a ResizeObserver
is not initialized, if no ref is passed.
Is there anything I can do the help get this PR merged?
Sorry I just don't have time to review things right now. Maybe sometime next week.
On Mon, 27 Jul 2020, 23:40 Jonathan Felchlin, notifications@github.com wrote:
Is there anything I can do the help get this PR merged?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ZeeCoder/use-resize-observer/pull/42#issuecomment-664652577, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4CKEXDWTKSGWZCEHWBNUTR5XX4XANCNFSM4PEED3IQ .
@ZeeCoder I don't mean to be a pest, but is there any chance you might have some time to look at this PR any time soon?
There are a couple issues with the proposed code changes here:
I've created a new PR based on your needs. Still a WIP, but will cover your use case and have the above points addressed as well: https://github.com/ZeeCoder/use-resize-observer/pull/44
Essentially the hook would consider "null" as a special ref param, which would signal for the hook that you might pass a real ref in later for observation, but for the time being you don't need it, and so a ResizeObserver instance would not be necessary either until then.
...by not passing a ref option.
Putting up this PR early for feedback. Tests are still needed.
I would like to use use-resize-observer, without adding the polyfill. This change makes that possible by not initializing the observer, if no
ref
is passed.