reactiveValues vs list of reactiveVal ... what are the practical differences?

What are the practical differences between managing a reactiveValues() object:

x <- reactiveValues()
x$foo <- 1:3
x$bar <- 3:1

vs ...
a list of reactiveVal objects:

x <- list()
x$foo <- reactiveVal(1:3)
x$bar <- reactiveVal(3:1)

There are some syntax differences in how the values are referenced, but are there larger architectural considerations and justifications for choosing one vs the other?

My current bias is the latter (a list of reactiveVal), mostly because I think it's more transparent (each entry is used as a very clear reactive source), but I might be missing out (due to lack of awareness) on some useful patterns with the former. (For context, I've historically used reactiveValues, as those were the only options way back when (v0.11), but since the introduction of reactiveVal, I've migrated to the second approach and am wondering if that was a good decision.)

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.