How do I use Django's naturaltime package in a React frontend?

101 Views Asked by At

I would like to use the Django naturaltime functionality from the humanize package, or something similar, in my React frontend.

Here is my current code:

<p>
     <b>
        {user.username} {post.created_at}
    </b>
</p>

Here is what I'm currently getting:

enter image description here

And here is what I'd like to get:

enter image description here

I appreciate any help - thank you in advance!

1

There are 1 best solutions below

0
On

I ended up using the react-moment package to solve this issue.