Throttling Frequent Data in React
In this post we will make a custom hook that will update state on a set interval, even if it is passed new data 60 times per second
I have a somewhat unique problem. I have a function being called 60 times per second, and it never stops being called. Most examples for throttling or debouncing only invoke the function after a rest period. In the case of an ARKit session, this never ends. The function is called constantly.
In this post we will be making a small hook that will store dat…
Keep reading with a 7-day free trial
Subscribe to zach.codes to keep reading this post and get 7 days of free access to the full post archives.