Can't reach refs of react component
<p>I created canvas element with ref="canvas" property.
When i try to get them in <code>componentDidMount</code>:</p>

<pre><code>componentDidMount = () =&gt; {
  console.log(this.refs);
}
</code></pre>

<p>There is empty Object.</p>

<p>BUT, then i do</p>

<pre><code>componentDidMount = () =&gt; {
  console.log(this);
}
</code></pre>

<p>I see React element with non-empty 'refs' Object containing my canvas!</p>

<p>How can this happen?</p>