Upgrade to Pro — share decks privately, control downloads, hide ads and more …

React Native Infinite List Done Right

React Native Infinite List Done Right

We'll briefly share our implementation of a true infinite list that properly recycle views with minimal memory footprint using React Native.

Vivian Cromwell

March 07, 2016

Transcript

11 slides
  1. How is it done natively? 5 4 7 6 8

    setContentOffset UITableView 5 4 7 6 8 4 5 6 7 8
  2. 5 4 7 6 8 How is it done in

    React Native? 4 5 8 6 7 3 4 5 8 6 7 3 2
  3. How is it done in Chop? 5 4 7 6

    8 50 40 60 70 80 4 5 6 7 3 30 40 50 60 70 57 58 59 60 56 560 570 580 590 600
  4. How to update the wait time bubble? • Update every

    20 seconds • List item is NOT touched • Observable ViewModel change detection • Component forceUpdate on ViewModel change
  5. • Scrollview with a fixed list of 12 fixed-height items

    • Absolute position for items at the right offset • List items are immutable • Virtual-DOM representation never grows in size • Minimize the scope of change detection if possible Key Points

Other Decks in Technology