Description Usage Arguments Value See Also Examples
View source: R/trace-invalidation.R
Prints the call stack that caused a reactive context to be invalidated. The most recent call is printed first.
1 2 | traceInvalidation(x = getCurrentContext(), graph = getReactGraph(), n = 1,
value = TRUE, quiet = FALSE, file = "", append = FALSE)
|
x |
A reactive context, expression, observer. Defaults to the current reactive context. |
graph |
A reactive graph. Defaults to the reactive graph for the current Shiny session. |
n |
Number of invalidations to trace back. Defaults to 1, the most recent invalidation. |
value |
If |
quiet |
If |
file |
A filename or connection to print to. Defaults to |
append |
If |
A list (stack) of reactive graph nodes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(shiny)
options(shiny.reactlog = TRUE)
val <- reactiveVal(1, label = "val")
rx <- reactive({
val()
})
observe({
traceInvalidation()
rx()
})
observe(val(10))
# trigger flush event (happens automatically in a Shiny app)
shiny:::flushReact()
traceInvalidation(rx)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.