react-hook icon indicating copy to clipboard operation
react-hook copied to clipboard

Allow opting out of @juggle/resize-observer polyfill

Open jsamr opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. The footprint of @react-hook/resize-observer is 86% occupied by its dependency on the @juggle/resize-observer. For those who don't need a polyfill, it's just a waste of resources:

image

Source: https://bundlephobia.com/package/@react-hook/[email protected]

Describe the solution you'd like

Move the polyfilled version to a separate library to keep the original lib slim.

jsamr avatar Jun 12 '22 11:06 jsamr

IME it's in your bundle somewhere anyway,but I hear you and I'd be ok with a new major version that makes the user provide any polyfills via options

jaredLunde avatar Jun 15 '22 00:06 jaredLunde

@jaredLunde Thank you so much! And grateful for your valuable contribution to react ecosystem.

jsamr avatar Jun 15 '22 01:06 jsamr