next-timeago
v0.2.0
Published
React timeago component for your next React apps.
Downloads
1,143
Maintainers
Readme
next-timeago
React timeago component for your next React apps.
🎁 Features
- No dependencies
- Compatible with both JavaScript and TypeScript
- Support for various languages
🔧 Install
next-timeago is available on npm. It can be installed with the following command:
npm install next-timeago --save
next-timeago is available on yarn as well. It can be installed with the following command:
yarn add next-timeago --save
💡 Usage
import { useTimeAgo } from 'next-timeago';
const Home = () => {
const { TimeAgo } = useTimeAgo();
return (
<>
<TimeAgo date='July 1, 2023' locale='kh' />
<TimeAgo date='July 1, 2023' locale='JA' />
<TimeAgo date='July 1, 2023 9:00 pm' />
<TimeAgo date='July 1, 2023 20:00' />
</>
);
}
export default Home;
Props
List of Locale Codes
📜 Changelog
Latest version 0.2.0 (2023-08-23):
- Upgrade dependencies
Details changes for each release are documented in the CHANGELOG.md.
❗ Issues
If you think any of the next-timeago
can be improved, please do open a PR with any updates and submit any issues. Also, I will continue to improve this, so you might want to watch/star this repository to revisit.
💪 Contribution
We'd love to have your helping hand on contributions to next-timeago
by forking and sending a pull request!
Your contributions are heartily ♡ welcome, recognized and appreciated. (✿◠‿◠)
How to contribute:
- Open pull request with improvements
- Discuss ideas in issues
- Spread the word
- Reach out with any feedback