Skip to content

Darmody/react-native-refresh-control-view

Repository files navigation

React Native Refresh Control View

npm version

Let you have ability to customize refresh control.

NOT READY YET

DEMO

Install

  # peer dependency
  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>
    );
  }
}

About

customize react native refresh control

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published