@traveloka/react-native-pace
v1.0.1
Published
![NPM Version](https://badge.fury.io/js/react-native-pace.svg) [![CircleCI](https://circleci.com/gh/traveloka/react-native-pace.svg?style=shield)](https://circleci.com/gh/traveloka/react-native-pace) [![PRs Welcome](https://img.shields.io/badge/PRs-welcom
Downloads
10
Readme
React Native PACE
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
| variable | Type | Default Value | Description |
| -------- | --------------------- | ------------- | ------------------- |
| progress | number | 0 | start from 0 to 100 |
| status | IDLE | START | DONE
| IDLE | status of progress |
Props
| Property | Type | Default Value | Description | | ---------------------------- | ------ | ------------- | ------------------------ | | resetDelay | number | 1000 | delay from done to idle | | config.blackListContentTypes | RegExp | none | black list content types | | config.blackListUrls | RegExp | none | black list urls | | config.whiteListUrls | RegExp | none | white 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.