title: react native FlatList scrollToItem error
body: <p>I'm using React Native <code>FlatList</code> component. when clicking on an list item , it adds more items to the list and scrolls to one of them using the function <code>ScrollToItem</code>.
  Sometimes when scrolling i get this error on android:</p>
  
  <blockquote>
    <p>scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, otherwise there is no way to know the location of offscreen indices or handle failures.</p>
  </blockquote>
  
  <p>I tried to implement the <code>getItemLayout</code> function, but my items doesn't have fixed height, and also i have multiple types of items with different heights.</p>
  
  <ul>
  <li>Maybe there is a way to handle these cases inside
  <code>onScrollToIndexFailed</code>?</li>
  <li>What are best practices for this kind of need?</li>
  </ul>