The reactiveValues() function

reactiveValues() creates a list of objects that can operate with reactive values but are not reactive values themselves. The main difference is that reactiveValues (unlike reactive objects) are not re-executed whenever an input value changes.

Due to this, reactive values are an optimal tool whenever certain register of previous inputs is needed. A good example of this could be counting the number of times an input value changes. In this case, a code is needed where the value of the counter depends on the input value change and on the counter's own previous value. As there is no possibility of operating with reactive values outside a reactive context, this should be inside a reactive context. In this case, as the result ...

Get Learning Shiny now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.