I have the following code
testUI <- function(id) {
ns <- NS(id)
return(
fluidRow(
column(3,
actionButton(ns("sampleButton"), "Sample")
),
column(9,
textOutput(ns("infoText"))
)
)
)
}
testServer <- function(input, output, session) {
data <- reactiveVal()
observeEvent(input$sampleButton,
{
fut <- future::future({return(10)})
promises::then(fut,
onFulfilled = function(value) {
data(value)
})
return(NULL)
})
output$infoText <- renderText({
if(is.null(data())) {
return("No data")
} else {
return(paste("data", data()))
}
})
}
The future spawns correctly, but when it resolves, the data infoText is not updated. Instead, it greys out. In the websocket I see that there's a "busy": "busy" message, but it never goes back to "busy": "idle".
I am using shiny 1.0.5, promises 1.0.1 and future 1.9.0