UNPKG

react-native-mjrefresh-xys

Version:

>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/H

21 lines (20 loc) 754 B
import React, {Component} from 'react'; import {VirtualizedList, FlatList,Platform} from 'react-native'; class MJFlatList extends FlatList { render() { return ( <VirtualizedList {...this.props} renderItem={this._renderItem} getItem={this._getItem} getItemCount={this._getItemCount} keyExtractor={this._keyExtractor} ref={this._captureRef} onViewableItemsChanged={ this.props.onViewableItemsChanged && this._onViewableItemsChanged } /> ); } } module.exports = Platform.OS === 'ios' ? MJFlatList : FlatList;