1.0.1 • Published 5 years ago

@traveloka/react-native-pace v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

React Native PACE

NPM Version CircleCI PRs Welcome

Installation

yarn

yarn add @traveloka/react-native-pace

npm

npm i @traveloka/react-native-pace --save

Getting Started

Basic Usage

import React from 'react';
import { Pace } from '@traveloka/react-native-pace';

export default function AwesomeScreen() {
  return (
    <Pace>
      {({ progress, status }) => (
        ...
      )}
    </Pace>
  );
}

Example

// TODO

or

cd Example
yarn
react-native run-ios

Documentation

- Pace

Importing

var Pace = require('@traveloka/react-native-pace').Pace;  // ES5

import { Pace } from '@traveloka/react-native-Pace';  // ES6

Children

variableTypeDefault ValueDescription
progressnumber0start from 0 to 100
statusIDLE | START | DONEIDLEstatus of progress

Props

PropertyTypeDefault ValueDescription
resetDelaynumber1000delay from done to idle
config.blackListContentTypesRegExpnoneblack list content types
config.blackListUrlsRegExpnoneblack list urls
config.whiteListUrlsRegExpnonewhite list urls

Contributing

We'd to have your helping hand on this package! Feel free to PR's, add issues or give feedback!

Credits

Written by Jacky Wijaya (@jekiwijaya) at Traveloka.