react-native-sk-countdown
What is it
react-native-sk-countdown is a simple countdown component for React Native, pure js implementation
How to use it
-
npm install react-native-sk-countdown@latest --save
-
Write this in index.ios.js / index.android.js
/** * Sample React Native App * https://github.com/facebook/react-native */'use strict';; var CountDownText = ; var test = React; const styles = StyleSheet; AppRegistry;
Properties
Any Text property and the following:
Prop | Description | Default |
---|---|---|
countType |
Countdown type, one of 'seconds' and 'date'. | None |
auto |
Whether to start countdown right now. | false |
timeLeft |
Seconds lefted to countdown. | None |
step |
Number to increment in each step. | -1 |
startText |
Text before countdown. | None |
endText |
Text after countdown. | None |
intervalText |
A function to reture a text during countdown. | None |
afterEnd |
A callback function after countdown. | None |
Methods
Method | Description | Params |
---|---|---|
start |
start countdown. | None |
end |
finish countdown. | None |