renderUI conditioned by a reactive value <p>Today I am trying to have a renderUI for which the form and the content depend on the value of a reactiveValues. I am working on a shinydashBoard</p> <p>At initial state, users will click on the button and the form of the renderUI will change. If users click one more time I would like that the renderUI takes the initial form again.</p> <p>Here is my code :</p> <pre><code>library(shiny) library(shinydashboard) sidebar &lt;- dashboardSidebar( ) body &lt;- dashboardBody( uiOutput("Text2Bis") )#dashboardBody header &lt;- dashboardHeader( title = list(icon("star-half-o"),"element-R") #messages, #notifications, #tasks ) ui &lt;- dashboardPage(header, sidebar, body) server &lt;- function(input, output, session) { previewAction &lt;- reactiveValues(temp = F) output$Text2Bis &lt;- renderUI({ if(is.null(input$button)){ box(width = 12,background = NULL, height = 100, actionButton("button","delete") ) } else{ print(input$button) if((isolate(input$button %%2)) == 1){ print(input$button) box(width = 12,background = NULL, height = 100, actionButton("button","delete") ) } else{ print(input$button) box(width = 12,background = NULL, height = 300, actionButton("button","save") ) } } }) } shinyApp(ui, server) </code></pre> <p>I can't understand why my app is not working. It seems that the actionButton is still reinitialized ???</p> <p>Do you have an idea to solve this problem ?</p> <p>Thank you very much in advance !</p> <p>Cheers</p> <p>Cha</p>