# NOT RUN {
if(interactive()){
library(shiny)
library(shiny.info)
ui <- fluidPage(
info_value("value_to_display")
)
server <- function(input, output, session) {
test_reactive <- reactiveVal("some value")
output$value_to_display <- render_info_value(expr = test_reactive())
# next line is required to work with toggle_info()
outputOptions(output, "value_to_display", suspendWhenHidden = FALSE)
}
}
# }
Run the code above in your browser using DataLab