Skip to contents
library(rsx)
#> 
#> Attaching package: 'rsx'
#> The following object is masked from 'package:stats':
#> 
#>     decompose

Vanilla

x <- component()
rsx_app(x)

Rhino

Appsilon’s {rhino} package uses an opinionated folder structure for Shiny applications, with an application’s entrypoint being in its app.R file:

# Rhino / shinyApp entrypoint. Do not edit.
rhino::app()

Rhino eventually uses ui and server objects from app/main.R as the entry point, so rsx_ui and rsx_module_server must be used in order to setup {rsx}.

x <- component()

# appsilon's rhino app/main.R
ui <- function(id) {
  rsx_ui(
    app(),
    id = id,
    app_class = "App"
  )
}

#' @export
server <- function(id) {
  rsx_module_server(id)
}

Golem

Golem uses the functions app_ui and app_server for a given Shiny application’s entrypoint, and so {rsx} can be used without much difficulty:

x <- component()
app_ui <- function() rsx_ui(x)
app_server <- rsx_server