Dustin Van de Wetering
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
Sign up
Untitled R workspace
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner
    library(shiny)
    
    ui <- fluidPage(
      textInput("comment", "Enter your comment:"),
      actionButton("save", "Save Comment"),
      textOutput("status")
    )
    
    server <- function(input, output) {
      
      observeEvent(input$save, 
        comment <- input$comment
          output$status <- renderText("Please enter a comment before saving.")
        
      })
    }
    
    shinyApp(ui, server)