use-datetime-countdown
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

use-datetime-countdown

A customizable countdown hook for React

Installation

To install the package, use npm:

pnpm add use-datetime-countdown

yarn install use-datetime-countdown

npm install use-datetime-countdown

Usage

import { useDatetimeCountdown } from 'use-datetime-countdown';

const date = new Date('2025-01-01T01:00:00.001Z');

const datetime = useDatetimeCountdown();

console.log(datetime);

// {
//     days: ...,
//     hours: ...,
//     minutes: ...,
//     seconds: ...,
// }

tsup

Bundle your TypeScript library with no config, powered by esbuild.

https://tsup.egoist.dev/

How to use this

  1. install dependencies
# pnpm
$ pnpm install

# yarn
$ yarn install

# npm
$ npm install
  1. Add your code to src
  2. Add export statement to src/index.ts
  3. Test build command to build src. Once the command works properly, you will see dist folder.
# pnpm
$ pnpm run build

# yarn
$ yarn run build

# npm
$ npm run build
  1. Publish your package
$ npm publish

test package

https://www.npmjs.com/package/use-datetime-countdown

Readme

Keywords

none

Package Sidebar

Install

npm i use-datetime-countdown

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

14.3 kB

Total Files

15

Last publish

Collaborators

  • dimetrix