change_scene {scenes}R Documentation

Choose Between Scenes

Description

Specify a function that uses actions and the request object to choose which Shiny UI to server.

Usage

change_scene(..., fall_through = default_ui())

Arguments

...

One or more shiny_scene objects.

fall_through

A ui to display if no scenes are valid. The default value, default_ui(), returns an HTTP 422 status code indicating that the request cannot be processed.

Value

A function that processes the request object to deliver a Shiny ui.

Examples

scene1 <- set_scene(
  "A shiny ui",
  req_has_query("scene", 1)
)
scene2 <- set_scene(
  "Another shiny ui",
  req_has_query("scene", 2)
)

ui <- change_scene(
  scene1,
  scene2
)
ui

[Package scenes version 0.1.0 Index]