Skip to contents

Define a shiny_scene by linking a UI to zero or more scene_action requirements.

Usage

set_scene(ui, ...)

Arguments

ui

A shiny ui.

...

Zero or more scene_actions.

Value

A shiny_scene.

Examples

scene1 <- set_scene(
  "A shiny ui",
  req_has_query("scene", 1)
)
scene1
#> $ui
#> [1] "A shiny ui"
#> 
#> $actions
#> $actions[[1]]
#> $check_fn
#> <partialised>
#> function (...) 
#> ~.fn(key = ~key, values = ~values, ...)
#> <environment: 0x55fc8eaad210>
#> 
#> $methods
#> [1] "GET"
#> 
#> attr(,"class")
#> [1] "scene_action" "list"        
#> 
#> 
#> attr(,"class")
#> [1] "shiny_scene" "list"       
scene2 <- set_scene(
  "Another shiny ui",
  req_has_query("scene", 2)
)
scene2
#> $ui
#> [1] "Another shiny ui"
#> 
#> $actions
#> $actions[[1]]
#> $check_fn
#> <partialised>
#> function (...) 
#> ~.fn(key = ~key, values = ~values, ...)
#> <environment: 0x55fc8ebb6e00>
#> 
#> $methods
#> [1] "GET"
#> 
#> attr(,"class")
#> [1] "scene_action" "list"        
#> 
#> 
#> attr(,"class")
#> [1] "shiny_scene" "list"