Do you have to wrap inputs with isolate() inside a observeEvent() funcion, or is that redundant?

If I have something like:

    observeEvent(input$in1, {
        temp <<- input$in2    
    })

And I only want that to run when input$in1 changes, then do I have to put an isolate() around the input$in2? Or does observeEvent do that for me?

I have the same exact question about eventReactive() as well. Does it isolate all the inputs within it other the one explicitly given to it?

Hi,

Both automatically implement isolate() and will only run when the specified input changes. eventReactive is different form observeEvent in that it saves output to a reactive variable, whilst observeEvent just runs code but not save it to a variable.

reactive() on the other hand does not implement isolate and will react to everything inside unless wrapped in isolate()

PJ

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.