useInterval with driftless
Opened this issue · 2 comments
paulmelnikow commented
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.
objectiveSee commented
Sounds cool to me! As long as it works! Is there any performance loss?
paulmelnikow commented
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.