Creates a function that calls fn at most once every wait milliseconds.
The first call runs right away. Calls during the wait are combined into one call at the
end of it, with the latest arguments, so the final state is never lost. Use it for events
that fire continuously, such as scrolling, when you want regular updates during them. To
run only once a burst is over, use debounce.
Creates a function that calls
fnat most once everywaitmilliseconds.The first call runs right away. Calls during the wait are combined into one call at the end of it, with the latest arguments, so the final state is never lost. Use it for events that fire continuously, such as scrolling, when you want regular updates during them. To run only once a burst is over, use
debounce.