# NOT RUN {
library(shiny)
library(waiter)
ui <- fluidPage(
autoWaiter(),
actionButton(
"trigger",
"Render"
),
plotOutput("plot"),
plotOutput("dom")
)
server <- function(input, output){
output$plot <- renderPlot({
input$trigger
Sys.sleep(3)
plot(cars)
})
output$dom <- renderPlot({
input$trigger
Sys.sleep(5)
plot(runif(100))
})
}
if(interactive())
shinyApp(ui, server)
# }
Run the code above in your browser using DataLab