react-hook
react-hook copied to clipboard
Allow opting out of @juggle/resize-observer polyfill
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:
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.
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 Thank you so much! And grateful for your valuable contribution to react ecosystem.