All Projects → st0ffern → React Native Optimized Flatlist

st0ffern / React Native Optimized Flatlist

Licence: mit
Optimization for complex and slow React Native FlatLists

Programming Languages

javascript
184084 projects - #8 most used programming language

react-native-optimized-flatlist

Greenkeeper badge

Optimization for FlatLists. This is a fix over the FlatList that removed every item that is not inside the viewport. This will give a more stable and faster FlatList as performance dont drop! :)

Please also read more about the issue here: https://github.com/facebook/react-native/issues/13413

Installation

npm i -S react-native-optimized-flatlist

or

yarn add react-native-optimized-flatlist

Usage

Just replace FlatList with OptimizedFlatList .. thats all! :)

Replace this:

render() {
  return (
  <FlatList
    data={[{name: 'fred', name: 'freddy'}]}
    renderItem={ ({item}) => <View>{item.name}</View>}
    />
...

With this:

...
import {OptimizedFlatList} from 'react-native-optimized-flatlist'

...
render() {
  return (
  <OptimizedFlatList
    data={[{name: 'fred', name: 'freddy'}]}
    renderItem={ ({item}) => <View>{item.name}</View>}
    />
...

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].