- Use Intl to render persian number for farsi languages
- Looking for help testing the results and then doing the same for Arabic
- Added support for React 18
- Added hi.js language strings
- Added so.js language strings
- Added oc.js language strings
- Update ru.js language strings
- Fix memory leak
- Update dependencies
- Added
eslint-plugin-react-hooks
and fixed the dependencies for hooks used in the library. Should result in a more consistent behaviour when changing props at runtime. - Updated dependencies
- Added
module
field to the package.json file so you can now import ES6 modules with only a minimal amount of pre-processing applied. Relevant when targeting newer browsers only. - A bunch of internal changes:
- Using
rollup
instead ofbrowserify
to compile the example - Updating a bunch of dependencies
- Using
- Added support for React 17
- Minor documentation fixes
- Bug Fix: clearTimeout when setting a new timeout. Prevents unnecessary renders.
- Pass in the
now
function as the last argument to the formatters. - Fix a bug in
buildFormatter
that would ignore the user-specifiednow
function and just usedDate.now
- Fixed the type of
Formatter
.- It's last argument is now correctly typed to be
() => React.Node
- This last argument is now a documented feature and is going to be set to the value of of the default formatter.
- Please Note, that you should not use this argument and instead import defaultFormatter from the package directly and use it as a fallback.
- It's last argument is now correctly typed to be
- Requires React ^16.
- Flow types updated to the latest version (0.69)
- Various bug-fixes.
minPeriod
andmaxPeriod
now accept seconds not milliseconds. This matches the documentation.- react-timeago now uses ES6 modules. So if you don't use ES6, your code will go from :
var TimeAgo = require('react-timeago')
to:
var TimeAgo = require('react-timeago').default
ES6 imports will continue to work the same way.
import TimeAgo from 'react-timeago'
- Fixed the many typos introduced by me in 2.2.0. Thanks to insin for the quick PR.
- FEATURE: New Props:
minPeriod
andmaxPeriod
to customize how often the Component updates.
- BUG-FIX: Fixed an issue, where changing the date wouldn't correctly update the update timer.
- FEATURE: Added PropType validation. It will now print a warning if you fail to pass in a date, instead of failing silently.
- BUG-FIX: Pending Timeouts are cleared when the Component is unmounted
- BUG-FIX: When new Props are passed in, the component will update itself correctly. Now you can flip the live switch on and off.
- FEATURE: The formatter function gets the original date as the fourth argument, for more custom date formats.