0.1.0 • Published 3 years ago
use-today v0.1.0
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
0.1.0
3 years ago