Skip to content

zackperdue/React-Deadline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

React Deadline

Countdown Timer for React and React Native

Install

npm install react-deadline --save

import CountdownTimer from 'react-deadline';

...

render() {
  return (
    <CountdownTimer
      endsAt={this.props.date}
      onUpdate={timer => this.setState({timer: timer})>
      {`${this.state.timer.hours}:${this.state.timer.minutes}:${this.state.timer.seconds}`}
    </CountdownTimer>
  )
}

Properties

  • endsAt string - any string that moment js can parse
  • onUpdate function - called every 1000ms (1 second). Use this to set your state to the timer values.

Dependencies

About

Countdown Timer for React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published