1.0.1 • Published 7 years ago
@traveloka/react-native-pace v1.0.1
React Native PACE
Installation
yarn
yarn add @traveloka/react-native-pacenpm
npm i @traveloka/react-native-pace --saveGetting 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-iosDocumentation
- Pace
Importing
var Pace = require('@traveloka/react-native-pace').Pace; // ES5
import { Pace } from '@traveloka/react-native-Pace'; // ES6Children
| 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.