Skip to content

About

The Pull-To-Refres component for React Native (iOS/Android)

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-pull-to-refresh (iOS/Android)

The pull-to-refresh view component for React Native

npmnpm

NPM

js-standard-style forthebadge

Demo

demo demo

Installation

in Cli

npm i react-native-pull-to-refresh --save

in JavaScript

import PTRView from 'react-native-pull-to-refresh';

Usage

var PullToRefreshProject = React.createClass({
  _refresh: function() {
    return new Promise((resolve) => {
      setTimeout(()=>{resolve()}, 2000)
    });
  },
  render: function() {
    return (
      <PTRView onRefresh={this._refresh} >
        <View style={styles.container}>
          <Text style={styles.welcome}>
            Let's Pull!
          </Text>
        </View>
      </PTRView>
    );
  },
});

Props

onRefresh

The method of refresh. You have to return promise object.

delay(defalt:0)

delay time of refresh

offset(defalt:80) iOS

distance of pull to refresh

colors(defalt:#000) Android

The background color of the refresh indicator

progressBackgroundColor(defalt:transparent) Android

The background color of the refresh indicator

Contributing

Welcome :)

License

MIT

About

The Pull-To-Refres component for React Native (iOS/Android)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages