title: How to solve 'Tried to get frame for out of range index NaN' - React native flatlist?
body: <p>here below is the code which was used, on open this page then it appears that 'Tried to get frame for out of range index NaN'.</p>
  <p>I don't understand where I got the issues. Please help.</p>
  <pre><code>import {FlatList} from 'react-native-gesture-handler';
  import {SIZES, constants} from '../../constants';
  const [row1Images, setRow1Images] = React.useState({
      ...constants.walkthrough_01_01_images,
      ...constants.walkthrough_01_01_images
    })
  
  const row1FlatListRef = React.useRef()
  
  &lt;FlatList
     ref={row1FlatListRef}
     decelerationRate=&quot;fast&quot;
     horizontal
     showsHorizontalScrollIndicator={false}
     listKey=&quot;Slider1&quot;
     keyExtractor={(_, index) =&gt; `Slider1_${index}`}
     data={row1Images}
     renderItem={({item, index}) =&gt; {
       return (
         &lt;View style={{width: ITEM_WIDTH,alignItems: &quot;center&quot;,justifyContent: &quot;center&quot;}}&gt;
           &lt;Image source={item} style={{width: 110,height: 110}} /&gt;
         &lt;/View&gt;
       )
     }}
  /&gt;
  </code></pre>