O'Reilly logo

Learning Shiny by Hernán G. Resnizky

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required