Skip to content

Should run_app() return the shiny object or print the output? #148

@ColinFay

Description

@ColinFay

This is in the spirit of #146 and #136

The current run_app() function does not "actually run the app". It does create an app object, which is returned and launched by the print() method for Shiny objects.

This is problematic for example for profvis, which doesn't work "natively" on xxx::run_app()

One way to do this would be to change run_app to

run_app <- function(...) {
  app <- with_golem_options(
    app = shinyApp(ui = app_ui, server = app_server), 
    golem_opts = list(...)
  )
  print(app)
}

which would allow profiling.

Though, this wouldn't allow to

z <- xxx::run_app()

so the object is no longer available to be manipulated.

Which seems like a good tradeoff, considering that we are already manipulating the app inside the run_app() function.

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