title: React array of refs
body: <p>i have read in a post on Stackoverflow <a href="https://stackoverflow.com/questions/38093760/in-react-js-is-there-any-function-similar-like-document-getelementbyid-in-ja/38093981#38093981">question about refs</a></p>
  
  <p>that we can use something like the following code to assign an array of refs to different inputs like this:</p>
  
  <pre><code>&lt;Progressbar completed={25} id="Progress1" ref={(input) =&gt; {this.Progress[0] = input }}/&gt;
  
  &lt;Progressbar completed={50} id="Progress2" ref={(input) =&gt; {this.Progress[1] = input }}/&gt;
  
  &lt;Progressbar completed={75} id="Progress3" ref={(input) =&gt; {this.Progress[2] = input }}/&gt;
  </code></pre>
  
  <p>but when i try it, it returns this error:</p>
  
  <pre><code>Uncaught TypeError: Cannot set property '0' of undefined
  </code></pre>
  
  <p>and it doesn't work, am I missing something?</p>