Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 446 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 446 Bytes

Use Today

A React hook for accessing the current date. When the date changes, the hook's value will update as well.

Install

# yarn
yarn add use-today

# npm
npm install --save use-today

Usage

import useToday from 'use-today';

let App = () => {
  let today = useToday();

  return (
    <div>
      <h1>{today.toISOString()}</h1>
    </div>
  )
}

License

MIT © Tobias Herber