use-interval icon indicating copy to clipboard operation
use-interval copied to clipboard

useInterval with driftless

Open paulmelnikow opened this issue 6 years ago • 2 comments
trafficstars

Hi! Would you be interested in a PR to optionally pass custom setInterval and clearInterval functions? I'd like to use this with driftless for better precision over time.

paulmelnikow avatar Jul 04 '19 02:07 paulmelnikow

Sounds cool to me! As long as it works! Is there any performance loss?

objectiveSee avatar Jan 28 '20 04:01 objectiveSee

Driftless is surely a little less performant than native, though the developer can choose this tradeoff when more precision is important. In the case of use-interval, using something like driftless would be opt-in, so there is no performance loss unless a developer chooses it.

paulmelnikow avatar Jan 29 '20 21:01 paulmelnikow