title: Understand the behaviour of a widget value in a shiny app
body: <p>I'm using a simple Shiny app as an example :<br />
  I would like to make sure that the widget &quot;myselection&quot; is informed before continuing my treatments in my application.<br />
  That's why I use <code>print(myselection)</code> to check the value and <code>req(myselection)</code>.<br />
  But it doesn't render any text this way.</p>
  <pre><code>ui &lt;- fluidPage(
    titlePanel(&quot;Example&quot;),
    mainPanel(
      actionButton(&quot;validate_see&quot;, &quot;Validate to see inputs&quot;),
      uiOutput(&quot;myselection_ui&quot;),
      textOutput(&quot;mysentence_ui&quot;)
    )
  )
  
  
  server = function(input, output, session) {
    
    observeEvent(input$validate_see, {
      
      output$myselection_ui &lt;- renderUI({
        selectInput(&quot;myselection&quot;, label = h3(&quot;Select box&quot;), 
                    choices = list(&quot;&quot;,&quot;tx_marge&quot;,&quot;tx_VA&quot;), 
                    selected = &quot;&quot;)
      })
      
      print(input$myselection)
      req(input$myselection)
      
      output$mysentence_ui &lt;- renderText({
        paste0(&quot;Your choice is : &quot;,input$myselection)
      })
    })
   
  }
  
  shinyApp(ui = ui, server = server)
  </code></pre>
  <p>And if I comment the line with <code>req(input$myselection)</code> it works<br />
  <code>print(myselection)</code> is printed as NULL.<br />
  I would like to understand why ??<br />
  Many thanks in advance !</p>