title: React Native getItemLayout
body: <p>I am implementing a <code>SectionList</code> showing a list of weeks which needs to scroll to the current week, thus I am using <code>initialScrollIndex</code>.</p>
  
  <p>The problem I face is that I don't really understand what the index given to my <code>_getItemLayout</code> is?
  Sometimes <code>data[index] === undefined</code>, which doesn't make sense to me.</p>
  
  <p>I need to know which section it is (<code>data[?]</code>) as each section contains another <code>SectionList</code> for the events that week, thus height isn't a constant.</p>
  
  <pre><code>_getItemLayout = (data, index) =&gt; {
    const rows = (data[index] === undefined) ? 1 : data[index].data.reduce((sum, value) =&gt; value.data.length + sum, 0);
    const height = (rows * 94);
    return {
      length: height,
      offset: height * index,
      index
    };
  }
  </code></pre>