Description Usage Arguments Details
Transforms a reactive expression by preventing its invalidation signals from being sent until activity has stopped for the given number of milliseconds. This lets you ignore a very "chatty" reactive expression until it becomes idle, which is useful when the intermediate values don't matter as much as the final value, and the downstream calculations that depend on the reactive expression take a long time.
1 | rx_debounce(rxexpr, millis, domain = shiny::getDefaultReactiveDomain())
|
rxexpr |
A reactive expression that invalidates too often. |
millis |
Number of milliseconds of inactivity to wait for before allowing invalidation to succeed. |
domain |
See domains. |
This is not a true debounce in that it will not prevent expr
from
being called many times (in fact it may be called more times than usual), but
rather, the reactive invalidation signal that is produced by expr is
debounced instead. This means that rx_debounce
should be used when
expr
is cheap but the things it will trigger (outputs and reactives
that use expr
) are expensive.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.