Hey, this part of the README seems to be out of date:
## Waiter
To use the waiter:
1. Include `use_waiter` in your UI.
2. Trigger `show_waiter` to show the waiting screen.
3. Eventually trigger `hide_waiter` to hide the loading screen.
It should be waiter_show instead of show_waiter and waiter_hide instead of hide_waiter. You have it right in the example below:
library(shiny)
library(waiter)
ui <- fluidPage(
use_waiter(), # include dependencies
actionButton("show", "Show loading for 3 seconds")
)
server <- function(input, output, session){
observeEvent(input$show, {
waiter_show( # show the waiter
html = spin_fading_circles() # use a spinner
)
Sys.sleep(3) # do something that takes time
waiter_hide() # hide the waiter
})
}
shinyApp(ui, server)
Hey, this part of the README seems to be out of date:
It should be
waiter_show
instead ofshow_waiter
andwaiter_hide
instead ofhide_waiter
. You have it right in the example below: