title: Why is a large flatlist slow? How can I use shouldComponentUpdate?
body: <p>I just want to confirm I have this right.</p>
  
  <p>My understanding is that a long flatlist in react native without pureComponent will update the state of each object in the list. So if you have a horizontal flatlist: </p>
  
  <pre><code>array = [A, B, C, D, E]
  
  with a horizontal flatlist rendered to look like:
  
  A | B | C | D | E
  </code></pre>
  
  <p>Then each page will be updated even if nothing  in the state changes for A-D but one thing changes in page E.</p>
  
  <p>My understanding is that a PureComponent overcomes this by doing a shallow comparison of the array to see if anything has changed, and only if there is a change, say E turns to F, then only that particular page updates.</p>
  
  <p>If this is correct, then how do you overcome deep changes to nested arrays?</p>
  
  <p>For example: </p>
  
  <pre><code>array = [ [1,2,3], [4,5,6], [7,8,9] ]
  </code></pre>
  
  <p>In the above case, if I change array[2][2] to 10 instead of 9, the PureComponent would overlook that because it only does shallow comparison. So what I do in my app right now is this.forceUpdate(), but I believe that causes a rerender of each page. so how could I use PureComponent without forceUpdate? I think it is through shouldComponentUpdate, but idk. Keep in mind I cannot change the data structure to something other than nested arrays.</p>