title: How to get returned div's offset/position in react?
body: <p>In my code return i have: </p>
  
  <pre><code>return (
    &lt;div  className="pos__container" &gt;
    &lt;div  className="pos__container--line" &gt;&lt;/div&gt;
      {timeList}
    &lt;/div&gt;
  ); 
  </code></pre>
  
  <p><code>&lt;div className="pos__container--line"&gt;</code> has <code>margin-left:10%;</code> other styles are irrelevant.</p>
  
  <p>In the function under constructor I want to get its position.</p>
  
  <p>To get the offset i need to get a div first.</p>
  
  <p>I have tried: 
  const element = ReactDOM.findDOMNode(this); which returns 
  <code>findDOMNode was called on an unmounted component.
  </code> 
  Also tried using document.QuerySelector(".pos__container--line"); which returns <code>null</code></p>
  
  <p>Feel like I'm out of the options. </p>
  
  <p>Any suggestions how I could do this right or any other ways to do it ?</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks in advance!</p>