tests/e2e/app-files/main.R

box::use(
  rhino[log, react_component],
  shiny,
)

box::use(app/view/hello, )

Box <- react_component("Box") # nolint object_name_linter

#' @export
ui <- function(id) {
  ns <- shiny$NS(id)
  shiny$tagList(
    Box(id = ns("box"), shiny$p("React works!")),
    hello$ui(ns("hello"))
  )
}

#' @export
server <- function(id) {
  shiny$moduleServer(id, function(input, output, session) {
    log$trace("This is a test")
    hello$server("hello")
  })
}

Try the rhino package in your browser

Any scripts or data that you put into this service are public.

rhino documentation built on Sept. 20, 2024, 5:10 p.m.