3 ms·
It is not easy to replace moment.js since many libraries like react-dates rely on momentjs. Hope they have plan to replace it.
by davidtranjs 6y ago
It is not easy to replace moment.js since many libraries like react-dates rely on momentjs. Hope they have plan to replace it.
- rvanmil 6y agoThese kind of dependencies is one of the reasons I prefer to avoid react-* libraries. It would be nice to see more flexible dependencies in such libs for example like material-ui pickers [0] which let’s you bring your own date/time lib. [0] https://material-ui-pickers.dev/getting-started/installation https://material-ui-pickers.dev/getting-started/installation
- hajile 6y agoAll the date libraries have different APIs. The only one that is currently standard (the Date object) is full of footguns and hard to use. You either ship without any date support at all or you pick a library and go. Very little comes close to Moment for i18n and timezone support, so lots of libraries go with that. The Temporal proposal to replace Date can't happen fast enough.