react-native-responsive-dimensions icon indicating copy to clipboard operation
react-native-responsive-dimensions copied to clipboard

Debounce Responsive hooks?

Open jakob-p opened this issue 3 years ago • 2 comments

Hi, would it be possible to add a debounce to the responsive hooks, so the number of re-renders per time is limited?

At the moment the hook is firing very often during resizing the browser window or rotating the device, causing a lot of re-rendering.

jakob-p avatar Nov 22 '21 11:11 jakob-p

something like this: https://github.com/jakob-p/react-native-responsive-dimensions/commit/12bf92f679229a591ef33fb15c3f61c88f87256a

I can open a PR if you want

jakob-p avatar Nov 23 '21 10:11 jakob-p

Please can this PR be merged

allindeveloper avatar Mar 04 '22 05:03 allindeveloper