react-native-customizable-refresh-control-view
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

React Native Refresh Control View

npm version

Let you have ability to customize refresh control.

NOT READY YET

DEMO

Install

  # peer dependency. Please follow react-native-gesture-handler's guide to setup it. 
  yarn add react-native-gesture-handler
  yarn add react-native-customizable-refresh-control-view

Usage

import React from 'react';
import { Text } from 'react-native';
import { ScrollView } from 'react-native-customizable-refresh-control-view';
 
class RefreshControl extends React.Component {
  render() {
    return <Text>Refreshing...</Text>;
  }
}
 
class ReactComponent extends React.Component {
  handlePullRefresh = () => {
    // refreshing, you can return promise here.
  };
 
  render() {
    return (
      <ScrollView
        onPullRefresh={this.handlePullRefresh}
        minRefreshDistance={100}
        RefreshControl={RefreshControl}
      >
        ...content
      </ScrollView>
    );
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-customizable-refresh-control-view

Weekly Downloads

7

Version

0.0.3

License

MIT

Unpacked Size

18 kB

Total Files

11

Last publish

Collaborators

  • darmody