I've decided to start learning React
this week, since there are so many jobs out there for this particular framework.
I come from an Angular background, and found myself wondering if there is an option in React that matches the purpose of Angular's DatePipe
.
There is not a built-in feature of the React API that handles this for you, which is generally the case for all of the functionality covered by Angular pipes. Instead, you have really three options for date formatting in React:
Native date handling, for example Intl.DateTimeFormat
Specialized React component, for example react-moment
External package that can manipulate dates, such as moment
Which to use depends on your specific needs, but in general I would recommend those in the order they are given.