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")
  })
}
Appsilon/rhino documentation built on Sept. 27, 2024, 7:01 p.m.