A React Native component that converts a timestamp of a future date to a readable countdown clock, based on a format.
npm install --save react-native-countdown-text
import React, { Component } from 'react';
import { Countdown } from 'react-native-countdown-text';
export default class App extends Component {
render() {
return <Countdown finishTime={1543622400} />
}
}
Name | Type | Default | Description |
---|---|---|---|
format |
string |
{d}:{h}:{m}:{s} |
The format that will be applied to the milliseconds |
finishTime |
number |
REQUIRED | The future date timestamp |
textStyle |
object |
The style that will be applied to the countdown text |
'{d} days, {h} hours, {m} minutes, {s} seconds'
'{h}:{m}:{s}'
'{d} days, {h}:{m}:{s}'
'{h}:{s}'