pmndrs / react-use-measure

🙌 Utility to measure view bounds
MIT License
845 stars 30 forks source link

Use custom debounce method #86

Open charkour opened 2 years ago

charkour commented 2 years ago

Is there a way to use a custom debounce method? My project is using lodash/debounce and this package installs its own debounce dependency. In order to save bytes, can I use lodash/debounce with this package? I'd like a similar API to adding a ResizeObserver polyfill.

const [ref, bounds] = useMeasure({ debounceFn: customDebounce });

Thank you for this package!