1.2.0 • Published 3 years ago

react-clock-counter v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-clock-counter

This library provides a hook to create a counter with custom datetime and update the clock on provided interval.

NPM JavaScript Style Guide

Install

npm install --save react-clock-counter

Usage with provided component.

import React, { Component } from 'react'

import { ClockCounter } from 'react-clock-counter'

class Example extends Component {
  render() {
    return <ClockCounter />
  }
}

Usage with hook

import React from 'react';
import { useClockCounter } from 'react-clock-counter'
function Example() {
    const {time} = useClockCounter();
    return <div>{time.toString()}</div>
}

License

MIT © krishnapaul242

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago