JohnCoene / waiter

🕰️ Loading screens for Shiny
https://waiter.john-coene.com/
Other
496 stars 25 forks source link

Wrong function name in README #86

Closed nicl-dev closed 3 years ago

nicl-dev commented 3 years ago

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)
nicl-dev commented 3 years ago

My PR got merged but it looks like the README.Rmd didn't generate a new README.md. Did i miss something?

JohnCoene commented 3 years ago

Ah, I forgot about that sorry. I had to re-render the README.Rmd to produce the README.md.