title: React-Native Reference to FlatList doesn't work
body: <p>I try to scroll always to the bottom of my flatlist in my react native app but unfortunately I don't get a reference to the flatlist.</p>
  
  <pre><code>            &lt;View style={styles.viewPointOverview}&gt;
                  &lt;Text &gt; Point overview: &lt;/Text&gt;
                  &lt;FlatList
                      ref={(ref) =&gt; this.flatList = ref}
                      data={pointRecord}
                      renderItem={({ item }) =&gt; &lt;Text&gt;{item}&lt;/Text&gt;}
                  /&gt;
              &lt;/View&gt;
  </code></pre>
  
  <p>And in the render function I try to call the method scrollToEnd()</p>
  
  <pre><code>this.flatList.scrollToEnd();
  </code></pre>
  
  <p>I tried it in the flatlist with </p>
  
  <pre><code>ref = {"flatlist"}
  </code></pre>
  
  <p>or</p>
  
  <pre><code>ref = "flatlist"
  </code></pre>
  
  <p>But none of them have worked I always get the error:
  TypeError: Cannot read property 'scrollToEnd' of undefined.</p>
  
  <p>You can find the complete code here: <a href="https://github.com/AlessandroVol23/Counter10000/blob/master/app/screens/PlayScreen.js" rel="nofollow noreferrer">https://github.com/AlessandroVol23/Counter10000/blob/master/app/screens/PlayScreen.js</a></p>