react-use-date
Basic usage:
const Clock = () => {
const date = useDate();
return <div>The current time is: {date.toISOString()}</div>;
};
Try the live demo for an in-depth explanation.
React hook to get current date, updating automatically
Repository npm JavaScript Download
Basic usage:
const Clock = () => {
const date = useDate();
return <div>The current time is: {date.toISOString()}</div>;
};
Try the live demo for an in-depth explanation.