react-native-refresh-list2
v1.0.2
Published
reactnative 下拉刷新统一android/ios 样式ios样式
Readme
react-native-refresh-list2
reactnative 下拉刷新统一android/ios 样式ios样式
Demo
Installation
npm install react-native-refresh-list2
npm install react-native-reanimated@^4.1.0 [email protected]并在业务项目的 Babel 配置中增加:
plugins: [
'@babel/plugin-transform-export-namespace-from',
'react-native-worklets/plugin',
];Usage
RefreshFlatList
import { RefreshFlatList, NormalControl } from 'react-native-refresh-list2';
<RefreshFlatList
data={data}
renderItem={renderItem}
keyExtractor={(item) => item.id}
refreshing={refreshing}
onRefresh={onRefresh}
refreshComponent={() => <NormalControl position="bottom" />}
/>;RefreshScrollView
import { RefreshScrollView, NormalControl } from 'react-native-refresh-list2';
<RefreshScrollView
refreshing={refreshing}
onRefresh={onRefresh}
refreshComponent={() => <NormalControl position="bottom" />}
>
{children}
</RefreshScrollView>;Contributing
License
MIT
Made with create-react-native-library
