Reactive values are a means of passing data from R to the UI and vice versa.
reactive_chr()
, reactive_lgl()
,
reactive_int()
and reactive_dbl()
will create
a reactive variable of the given type.reactive_textbox()
is a special variable needed to
handle the current contents of a multiline textbox.If you are familiar with shiny
, then reactive values in
this package work in a similar way to shiny::reactiveVal
objects.
library(tickle)
val <- reactive_dbl(1.0)
# To fetch the actual value, call with no argument
val()
#> [1] 1
# Give an argument to set the value
val(1.23)
val()
#> [1] 1.23