Skip to contents

[Deprecated]

This function is deprecated and will be removed in a future release of teal.

This is a customization of shinyApp.

To be bookmarkable, the Shiny UI function must have an argument request. This function ensures this.

When ui is a function, it passes the following to shinyApp

app <- teal::init(....)
ui <- app$ui
ui_new <- function(request) {
  ui() # or just `ui` when ui is already evaluated, e.g. `shiny.tag`
}

If no bookmarking is needed for teal apps, then you can also call shinyApp(ui = app$ui, server = app$server), where app is returned by init().

**For Developers: ** The reason you cannot call shinyApp(ui = app$ui, server = app$server) without parentheses is that app$ui has an id argument with a default value which makes it possible to be added into modules. shinyApp thinks that this is the request argument which is needed for bookmarking. This avoids it.

We guarantee that anything that can be run with shinyApp can be replaced by a call to this function without any changes.

Usage

bookmarkableShinyApp(ui, server, ...)

Arguments

ui

function or shiny.tag Shiny UI; either a shiny.tag or a function with no argument or one argument (request)

server

function Shiny server function

...

additional arguments to shinyApp

Value

shinyApp value