Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

rax-use-countdown

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax-use-countdown

Rax useCountDown hook

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

rax-use-countdown

npm package npm downloads

A countdown hooks which will return the left days/hours/minutes/seconds state.

Install

$ npm install rax-use-countdown --save

API

The API will recevie two params -- start/end.

TypeDescription
startnumberStart time
entnumberEnd time

Example

import { createElement } from 'rax';
import useCountDown from 'rax-use-countdown';

function Example() {
  const now = Date.now();
  const { days, hours, minutes, seconds } = useCountDown(now, now - 10000000);

  return <div>There only left {days}days {hours}hours {minutes}minutes {seconds}seconds</div>;
}

FAQs

Package last updated on 21 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts