Skip to content

An Awesome Countdown Timer component for ReactJS, developed in ReactJS.

Notifications You must be signed in to change notification settings

hassantauqeer/react-awesome-countdowntimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-awesome-countdowntimer

An awesome countdowntimer only developed for react, but coded so nicely can be understood and used for other libraries too. Basically a tick() function that runs when component mounts with an interval of 1000ms setInterval(this.tick, 1000).

Table of Contents

Installation

npm install --save react-awesome-countdowntimer
Dependencies
  • moment.js - This component depends on momen.js library so you should have this installed in you project!
Properties
Property Type Description Working Example
endDate object Takes date & time when timer has to end Yes endDate(moment('06/18/2018 15:00:00'))

Example

import React from 'react';
import moment from 'moment';
import CountdownTimer from 'react-awesome-countdowntimer';

class SimpleComponent extends React.Component {
    return (
        <CountdownTimer endDate={moment('06/12/2018 12:00:00', 'DD/MM/YYYY hh:mm:ss')}/>
    );
  }
}

Example App

cd example-app/

then

yarn
yarn start

About

An Awesome Countdown Timer component for ReactJS, developed in ReactJS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages