Format a Date Relative to the Current Date Using react-intl FormattedRelative

InstructorDamon Bauer

Share this video with your friends

Send Tweet

Given a date, we’ll use the react-intl FormattedRelative component to render a date in a human readable format, such as “2 days ago”, in various languages.

We'll also see how to set the frequency of this component's rendering to make our app update the text in real-time.

Vijay P R
~ 4 years ago

Does FormattedRelative cause re-render ? Checked with react-dev-tools and couldn't find component getting updated . Is it directly manipulated via refs ?