# rntpc_react-native-mjrefresh
**Repository Path**: openharmony-sig/rntpc_react-native-mjrefresh
## Basic Information
- **Project Name**: rntpc_react-native-mjrefresh
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: https://gitee.com/openharmony-sig/rntpc_react-native-mjrefresh
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-10-14
- **Last Updated**: 2025-05-07
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 🚨 **重要提示 | IMPORTANT**
>
> **⚠️ 此代码仓已归档。新地址请访问 [rntpc_react-native-mjrefresh](https://gitcode.com/openharmony-sig/rntpc_react-native-mjrefresh)。| ⚠️ This repository has been archived. For the new address, please visit [rntpc_react-native-mjrefresh](https://gitcode.com/openharmony-sig/rntpc_react-native-mjrefresh).**
>
---
>
# React Native MJRefresh[](https://badge.fury.io/js/react-native-mjrefresh)
>React-Native-MJRefresh可完成使用React Native对IOS进行自定义下拉刷新设置
>
>onPulling参数为{nativeEvent:percent},结合lottie-react-native可以获得绝佳的下拉刷新效果
>
>自定义详情可见Example:[HuaWeiRefreshControl.js](https://github.com/react-native-studio/react-native-MJRefresh/blob/master/Example/HuaWeiRefreshControl.js)
>
>ListView使用见:[ListViewExample](https://github.com/react-native-studio/react-native-MJRefresh/blob/master/Example49/ListViewExample.js)
>
>FlatList使用见:[FlatListExample](https://github.com/react-native-studio/react-native-MJRefresh/blob/master/Example49/FlatListExample.js)
>
>Android自定义下拉刷新组件见[React-Native-SmartRefreshLayout](https://github.com/react-native-studio/react-native-SmartRefreshLayout)
>
## 安装
### 第一步
工程目录下运行:
```bash
npm install --save react-native-mjrefresh (rn>=0.55.0)
npm install --save react-native-mjrefresh-lower (rn<=0.54)
```
or(已经安装了yarn)
```bash
yarn add react-native-mjrefresh (rn>=0.55)
yarn add react-native-mjrefresh-lower (rn<=0.54)
```
### 第二步
#### 使用link添加:
工程目录下运行:
```bash
react-native link react-native-mjrefresh (rn>=0.55)
react-native link react-native-mjrefresh-lower(rn<=0.54)
```
#### 使用CocoaPods添加:
podfile添加:
```bash
pod 'RCTMJRefreshHeader', :path => '../node_modules/react-native-mjrefresh'
```
执行:
```bash
pod install
```
### 第三部使用
在工程中导入:
```javascript
import MJRefresh,{ScrollView} from 'react-native-mjrefresh'//rn>=0.55
//import MJRefresh,{ScrollView} from 'react-native-mjrefresh-lower'//rn<=0.54
//该ScrollView兼容官方所有的属性和方法,refreshControl也可以使用官方的RefreshControl
state={
text:'下拉刷新'
}
render() {
return (