1.0.5 • Published 4 years ago

react-native-countdown-text v1.0.5

Weekly downloads
214
License
ISC
Repository
github
Last release
4 years ago

react-native-countdown-text

npm version

A React Native component that converts a timestamp of a future date to a readable countdown clock, based on Moment.js since version 1.0.4.

Installation

npm install --save react-native-countdown-text

Usage

import React, { Component } from 'react';
import { Countdown } from 'react-native-countdown-text';

export default class App extends Component {
    render() {
        return <Countdown finishTime={1543622400} />
    }
}

Properties

NameTypeDefaultDescription
formatstringd:kk:mm:ssThe format that will be applied to the milliseconds
finishTimenumberREQUIREDThe future date timestamp
onFinishfuncWill run when it's the finish time
textStyleobjectThe style that will be applied to the countdown text

For more on formats see docs about formats in Moment.js

What's new in the latest version

Version: 1.0.4

Release date: 28/02/2020

  • Moment.js integration
  • onFinish function that will run on finish
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

1.0.0

5 years ago