title: How to display response data using react
body: <p>I'm making a project using rabbitMQ and react.</p>
  <p>I did connect rabbitMQ server and my react app, and I finally success get some data from server.</p>
  <p>I can print those data in console (like using console.log()), however I cannot display data in html.</p>
  <p>I tried to use async/await but it didn't work.</p>
  <pre><code>function ServerTest() {
  
  var a:any;
  const client = createClient(&quot;admin&quot;, &quot;1111&quot;);
      const queue = v4();
      
  
      client.onConnect = function () {
          console.log(&quot;connected to Stomp&quot;);
  
          subscribe(client, 'admin', queue, (payload: {}) =&gt; {              
              a = payload;
              a = a.UserInfo.userId
              console.log(a)
          })
  
          publish(client, 'api.user.info', 'admin', queue, {})
  
      }
  
      client.activate();
  
      
      return (&lt;div&gt;a: {a}&lt;/div&gt;)
  }
  </code></pre>