title: Meta tags react js
body: <p>I'm having a little problem. </p>
  
  <p>My web-app is written in <strong>react js</strong> (client-side) and <strong>express js</strong> (server side).</p>
  
  <p>I searched alot about the <strong>meta-tags</strong>, and how it works in <strong>react</strong>. Website like <strong>Facebook, Twitter</strong> and so on take the metatags that are in the original document and not the metatags created by js.</p>
  
  <p>Now I founded this library: <strong><a href="https://github.com/nfl/react-helmet" rel="nofollow noreferrer">https://github.com/nfl/react-helmet</a></strong> . It is very useful, but I'm not understanding where I am wrong.</p>
  
  <p>I've a component, I load informations in <strong>componentWillMount()</strong> function, and then in my <strong>render()</strong> function I've this:</p>
  
  <pre><code>{!this.state.loading &amp;&amp; this.state.user !== null &amp;&amp; // setto i metatags
     &lt;Helmet&gt;
         &lt;title&gt;{this.state.user.username}&lt;/title&gt;
         &lt;meta property="og:title" content={this.state.user.biography}&gt;&lt;/meta&gt;
     &lt;/Helmet&gt;
  }
  </code></pre>
  
  <p>It works, I've my <strong>username in title</strong>, and <strong>the description as I want</strong>.</p>
  
  <p><a href="https://i.stack.imgur.com/iVn4G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iVn4G.png" alt="enter image description here"></a></p>
  
  <p>But when I copy my link to Facebook, I <strong>saw the original title and description</strong> <strong>that are on the index.html file</strong>. If I delete the  and other meta-tags from index.html, I've an empty "preview url". </p>
  
  <p><strong>How could I solve?</strong></p>