项目
在 GitHub 查看
st0ffern/react-native-optimized-flatlist
关于
Optimization for complex and slow React Native FlatLists
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文react-native-optimized-flatlist
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>}
/>
...
探索相关项目
加载中…