Debounce and throttle

Debounce and throttle are used to slow down a reactive expression. For example, suppose we are using the invalidation check for a reactive expression and error indications are prompted unnecessarily. We can use debounce and throttle to make expressions such as these slow down and wait for intermediate expressions to complete their calculations. The syntaxes of both of these are as follows:

debounce(r, millis, priority = 100, domain = getDefaultReactiveDomain()) 
 
throttle(r, millis, priority = 100, domain = getDefaultReactiveDomain()) 

Here, r is the reactive expression that invalidates too often. millis is the time window used by debounce/throttle, and priority sets the observer's priority. For example, if we want to ...

Get Web Application Development with R Using Shiny - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.