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;
import { Pace } from '@traveloka/react-native-Pace';
Children
variable | Type | Default Value | Description |
---|
progress | number | 0 | start from 0 to 100 |
status | `IDLE | START | DONE` |
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.