Files
shiny/tests/testthat
Joe Cheng cef1f3c7ee withReactiveDomain now acts as a promise domain
Without this change, async handlers won't return any
value for getDefaultReactiveDomain().

    library(shiny)
    library(promises)

    ui <- fluidPage(
      p("This app tests if async handlers have reactive domains. You'll get a yes/no answer below."),
      h3(
        "Does it work?",
        textOutput("answer", inline = TRUE)
      )
    )

    server <- function(input, output, session) {
      output$answer <- renderText({
        promise_resolve(TRUE) %...>% {
          if (!is.null(getDefaultReactiveDomain()))
            "Yes!"
          else
            "No :("
        }
      })
    }

    shinyApp(ui, server)
2018-04-16 20:51:46 -05:00
..
2016-08-02 13:47:42 -05:00
2016-03-03 15:00:51 -06:00
2018-03-27 15:35:29 -07:00
2018-02-09 11:12:46 -08:00
2016-03-03 15:00:51 -06:00
2018-03-27 15:35:29 -07:00
2018-02-09 11:12:45 -08:00
2018-03-27 15:35:29 -07:00