R - Shiny - How to update a textOutput multiple times in an observer
<p>I have a question about updating a text output in a shiny app.</p>

<p>In an observer, I make several computations, and, between each of them, I want to show informations in a text output.</p>

<p>I tried several things, but the only thing it is showing is the last information :</p>

<pre><code>library(shiny)

ui &lt;- fluidPage(
  headerPanel("Hello !"),
  mainPanel(
    actionButton("bouton", "Clic !"),
    textOutput("texte")
  )
)

server &lt;- function(input,output, session){

  observeEvent(input$bouton, {
    output$texte = renderText("Initialization...")
    Sys.sleep(1)
    output$texte = renderText("Almost ready...")
    Sys.sleep(3)
    output$texte = renderText("Ok !")
  })
}

runApp(list(ui=ui,server=server), launch.browser = TRUE)
</code></pre>

<p>Or :</p>

<pre><code>library(shiny)

ui &lt;- fluidPage(
  headerPanel("Hello !"),
  mainPanel(
    actionButton("bouton", "Clic !"),
    textOutput("texte")
  )
)

server &lt;- function(input,output, session){
  rv = reactiveValues()

  rv$mess = ""

  observeEvent(input$bouton, {
    rv$mess = "Initialization..."
    Sys.sleep(1)
    rv$mess = "Almost ready..."
    Sys.sleep(3)
    rv$mess = "Ok !"
  })
  observe({
    output$texte &lt;&lt;- renderText(rv$mess)
  })
}

runApp(list(ui=ui,server=server))
</code></pre>

<p>Edit : in these two examples, it shows nothing until the last message "OK !"</p>

<p>Where am I wrong ?</p>

<p>Thanks for your help !</p>