@twigaeng/react-hooks
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@twigaeng/react-hooks

A collection of tiny but useful react hooks

NPM JavaScript Style Guide

Install

npm install --save @twigaeng/react-hooks

Usage

import React from 'react'

import { useSalesDays } from '@twigaeng/react-hooks/'

const App = () => {
  const date = new Date();
  const today = date.getDay();
  const tomorrow = today + 1;
  const isTodayASalesDay = useSalesDays([today])
  const isTomorrowASalesDay = useSalesDays([tomorrow])
  return (
    <div>
      <p>Is today a sales days? {isTodayASalesDay.toString()}</p>
      <p>Is tomorrow a sales days? {isTomorrowASalesDay.toString()}</p>
    </div>
  )
}
export default App

License

MIT © joeynimu


This hook is created using create-react-hook.

Readme

Keywords

none

Package Sidebar

Install

npm i @twigaeng/react-hooks

Weekly Downloads

6

Version

1.2.0

License

MIT

Unpacked Size

457 kB

Total Files

27

Last publish

Collaborators

  • joeynimu
  • twiga-eng