unreactify: Unreactify

Description Usage Arguments Value Examples

View source: R/utils_unreactify.R

Description

Returns the returned value of a reactive if the input arg is a reactive, or simply returns its current value if not. This is useful for handling returned lists of values from modules where some elements are reactive but others are not. It may also be useful in cases where you want a module to have the flexibility to use a reactive in some instances but a static value in others.

Usage

1
unreactify(elem)

Arguments

elem

Value

returned value of eleme if reactive, else elem

Examples

1
2
3
4
example_1 <- reactive({ return("tabby cats") })
example_2 <- "tuxedo cats"
unreactify(example_1)
unreactify(example_2)

aftonsteps/shinycsshelper documentation built on Dec. 18, 2021, 11:21 p.m.