react-human-time
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

react-human-time

npm install --save react-human-time

A React component that wraps the library human-time and periodically updates it so you don't need to manually get updated "X minutes ago" strings.

Usage

<h1>Andre said hi to you <HumanTime time={timestamp} /></h1>

Renders as Andre said hi to you 2 mins ago.

You can also set the frequency of updates with the prop period:

<h1>Andre said hi to you <HumanTime time={timestamp} period={120e3} /></h1>

Readme

Keywords

none

Package Sidebar

Install

npm i react-human-time

Weekly Downloads

10

Version

1.2.0

License

MIT

Unpacked Size

32.2 kB

Total Files

11

Last publish

Collaborators

  • staltz