Skip to content

Changes to reactive values not displaying accurately #36

@jcheng5

Description

@jcheng5

Set options(shiny.reactlog=TRUE), then run this app:

library(shiny)

ui <- fluidPage(
  uiOutput("ui")
)

server <- function(input, output, session) {
  output$ui <- renderUI({
    numericInput("x", "x", 5)
  })
  
  observe({
    print(input$x)
  })
}

shinyApp(ui, server)

If you don't touch any inputs, you'll see that the input$x value is 5. Now launch the reactlog. It'll say that input$x is NULL.

I don't repro this problem without using the renderUI; it's almost like the initial value being NULL causes the next value to be lost.

For what it's worth, the 063-superzip example app is where I saw this first; input$map_bounds stays NULL longer than it should.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions