Decompose a component instance
decompose.Rd
Given a component instance tag x
, decompose the instance
into separate server and UI elements.
Examples
comp <- component(
name = "decompose",
template = function(ns) {
shiny::div("hello world")
},
methods = list(
setup = function(input, output, session) {
# noop
}
)
)
x <- decompose(comp())
print(x)
#> $server
#> function(input, output, session) {
#> # noop
#> }
#> <environment: 0x5641de557320>
#>
#> $ui
#> <rsx::instance> `decompose`
#> <div>hello world</div>
#>