Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-native-customizable-refresh-control-view

Darmody21MIT0.0.3TypeScript support: included

a customizable react native refresh control component

readme

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>
    );
  }
}