在闪亮的应用程序启动时显示通知

tic*_*hoc 6 r shiny

为了向我的应用程序添加免责声明,我想在应用程序启动时显示一条带有showNotification().

用户不必按下按钮(如下所示)即可显示消息。

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

Por*_*hop 6

改成observe

   observe({
      showNotification("This is a notification.")
    }) 
Run Code Online (Sandbox Code Playgroud)