Skip to content

Catch render functions included in UI #4189

@simon-smart88

Description

@simon-smart88

I sometimes find myself doing this where I mistakenly use a renderX() in the UI:

library(shiny)

ui <- fluidPage(
  renderTable("table")
)

server <- function(input, output, session) {
  output$table <- renderTable("table")
}

shinyApp(ui, server)

Surprisingly, this doesn't produce any errors, unlike if you mix it up the other way round and put output$table <- tableOutput("table") in the server. Is there anything that could be done to catch it and issue a warning or an error? If not normally, then how about when devmode() is active?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions