react-native-countdown-text

    1.0.5 • Public • Published

    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

    Name Type Default Description
    format string d:kk:mm:ss The format that will be applied to the milliseconds
    finishTime number REQUIRED The future date timestamp
    onFinish func Will run when it's the finish time
    textStyle object The 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

    Keywords

    none

    Install

    npm i react-native-countdown-text

    DownloadsWeekly Downloads

    252

    Version

    1.0.5

    License

    ISC

    Unpacked Size

    3.4 kB

    Total Files

    3

    Last publish

    Collaborators

    • realkfiros