1.3.0 • Published 4 years ago

react-headless-countdown v1.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

react-headless-countdown

React date countdown using render props. Support for hooks is on its way :)

NPM JavaScript Style Guide

Install

npm install --save react-headless-countdown

Usage

import React, { Component } from "react";

import DateCountdown from "react-headless-countdown";

class Example extends Component {
  render() {
    const date = new Date("2021-01-01"); // New year 2021!

    return (
      <DateCountdown date={date}>
        {({ timeLeft, isValidDate, isValidFutureDate }) => (
          <div>Render the countdown here!</div>
        )}
      </DateCountdown>
    );
  }
}

Example in action here. You can checkout the examples folder for how to use it.

License

MIT © Param-Harrison

1.3.0

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.4

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago