developerdizzle / react-virtual-list

Super simple virtualized list React component
http://developerdizzle.github.io/react-virtual-list/
MIT License
619 stars 73 forks source link

Best Practices (WIP) #45

Open developerdizzle opened 7 years ago

developerdizzle commented 7 years ago

Using this space to gather some best practices before incorporating into the official documentation.

  1. Set keys on your list items
  2. mobx devs using observable arrays should call slice on their observables before using as the items prop on the virtual component.
  3. Use initialState for server-side rendering
  4. Override mapVirtualToProps if you prefer to use other style rules (instead of paddingTop), such as translateY
  5. Be aware of the maximum document/element height for each browser