rstudio / reactlog

Shiny Reactivity Visualizer
http://rstudio.github.io/reactlog
Other
121 stars 9 forks source link

reactlog does not work with shinydashboard? #47

Open dwhdai opened 4 years ago

dwhdai commented 4 years ago

reactlog 1.0 does not appear to work with shinydashboard. Is there a plan to implement this compatibility in the future?

schloerke commented 4 years ago

Do you have an example where it doesn't work?

I can get it to run on a basic example.

library(shiny)
options(shiny.reactlog = TRUE)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard"),
  dashboardSidebar(),
  dashboardBody(
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(plotOutput("plot1", height = 250)),

      box(
        title = "Controls",
        sliderInput("slider", "Number of observations:", 1, 100, 50)
      )
    )
  )
)

server <- function(input, output) {
  set.seed(122)
  histdata <- rnorm(500)

  output$plot1 <- renderPlot({
    data <- histdata[seq_len(input$slider)]
    hist(data)
  })
}

shinyApp(ui, server)

Screen Shot 2019-07-08 at 12 47 33 PM (matching port number) Screen Shot 2019-07-08 at 12 47 15 PM