Nothing
library(shiny)
# Parent passes context = list(user = "Alice") to Outlet.
# Child reads it with useOutletContext().
ui <- reactRouter::RouterProvider(
router = reactRouter::createHashRouter(
reactRouter::Route(
path = "/",
element = div(
reactRouter::Outlet(context = list(user = "Alice", role = "admin"))
),
reactRouter::Route(
index = TRUE,
element = div(
div(
id = "contextUser",
reactRouter::useOutletContext(
tags$span(),
selector = "user"
)
),
div(
id = "contextRole",
reactRouter::useOutletContext(
tags$span(),
selector = "role"
)
),
div(
id = "contextAll",
reactRouter::useOutletContext(
tags$span()
)
),
div(
id = "contextRender",
reactRouter::useOutletContext(
render = reactRouter::JS("c => `${c.user} (${c.role})`")
)
)
)
)
)
)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.