<TimeAgo>

The <TimeAgo> component displays the amount of elapsed time since a message was sent.

interface TimeAgoProps

Properties

A collection of objects which are passed to all Chatbox theme components.

timestamp
: number

The timestamp of when the message was sent. Holds the number of milliseconds passed since the Unix Epoch.

Example

In the default theme, the <TimeAgo> component is implemented as follows:

TimeAgo.js
1// loading...