1.0.0 • Published 6 years ago
react-native-smart-refreshview v1.0.0
react-native-smart-refreshview
Getting started
$ npm install react-native-smart-refreshview --save
Mostly automatic installation
$ react-native link react-native-smart-refreshview
Manual installation
iOS
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.view.smartrefresh.RNSmartRefreshPackage;
to the imports at the top of the file - Add
new RNSmartRefreshPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-smart-refreshview' include ':react-native-smart-refreshview:ptrrefresh' project(':react-native-smart-refreshview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smart-refreshview/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-smart-refreshview')
Windows
Usage
import PullToRefreshScrollView from 'react-native-smart-refreshview';
// TODO: What to do with the module?
<PullToRefreshScrollView
refreshing={this.state.refreshing}
onPullRefresh={this.onPullRefresh.bind(this)}
style={{backgroundColor:'#f7f7f7',flex:1}}>
</PullToRefreshScrollView>
react-native-smart-refreshview
1.0.0
6 years ago