react-time-ago
A component for updating the format of a date based on the elapsed time. The formatter is pluggable and extensible. By default it will use now, X minute(s) ago, X hour(s) ago and X day(s) ago. It uses the renderProp pattern to give you full control over how stuff is rendered. Internally it uses zen-observable.
Differences to other available solutions:
- Works on react for the web and react-native.
- Instead of checking all dates at a given interval it checks and updates single dates only when necessary
Install
Usage
Default
or