简体   繁体   中英

Show notification on shiny app startup

In order to add a disclaimer to my app, I want to display a message at the launch of the app with showNotification() .

The user should not have to press a button (as per below) for the message to appear.

shinyApp(
ui = fluidPage(actionButton("show", "Show")),   
server = function(input, output) {
    observeEvent(input$show, {
      showNotification("This is a notification.")
    })   
})

Change to observe

   observe({
      showNotification("This is a notification.")
    }) 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM