(Translated by https://www.hiragana.jp/)
GitHub - KyleAMathews/react-autoupdate-time: Renders a <time> element that autoupdates at a configurable interval
Skip to content

KyleAMathews/react-autoupdate-time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-autoupdate-time

Renders a <time> element that autoupdates at a configurable interval.

var date = new Date();
<AutoupdateTime value={date} />

Set custom update interval (defaults to 3000 miliseconds).

var date = new Date();
<AutoupdateTime value={date} interval=1000 />

Uses moment.js internally to render a relative time e.g. "an hour ago".

About

Renders a <time> element that autoupdates at a configurable interval

Resources

License

Stars

Watchers

Forks

Packages

No packages published