title: How can I get component's position by ref in React?
body: <p>I'm using React 15.3.1 for my app. So, I need to get <code>Component</code> x and y positions in it's parent. The child is rendered like this:</p>
  
  <pre><code>&lt;Icon key={key} ref={(c) =&gt; this['icon' + key] = c}}/&gt;;
  </code></pre>
  
  <p>And this is how I try to access <code>Icon</code> (which is basically a <code>div</code>) position:</p>
  
  <pre><code>let icon = this['icon' + this.state.currentIcon.id];
  icon.getBoundingClientRect(); //Error: "getBoundingClientRect" is not a function
  </code></pre>
  
  <p>The child is correct, I can see it's <code>props</code> in the debugger. But I cannot see any properties like <code>getBoundingClientRect</code>, <code>left</code>, <code>top</code> or any other position attributes. What I need to do to get them?</p>