Consider switching dependencies from moment.js to date-fns
For me, the amount of size that moment.js adds to my builds is unmanageable. There are other issues:
https://github.com/date-fns/date-fns/issues/275#issuecomment-264934189
Date-fns has some very good endorsements:
https://twitter.com/dan_abramov/status/805030922785525760?lang=en
Would you consider, if I were to submit a pull request to switch the dependency from moment.js to date-fns?
+1.
I've just migrated the project to date-fns and the native Date type https://github.com/kkomelin/time-picker
- See what has changed for the end-user here.
- The Storybook examples work as expected
npm start. - Most of the automated tests are successful
npm test. There are a couple of failed (incorrect values handling).
To play with the project, install it with npm i https://github.com/kkomelin/time-picker
Roadmap
- [x] Perform migration from
Moment.jstodate-fns. - [ ] https://github.com/date-fns/date-fns/issues/916: Need to find a way to simulate the strict parsing mode of Moment.
- [ ] Fix failed automated tests (because of the lack of strict parsing mode in date-fns)
- [ ] Discuss with
react-component/time-pickermaintainers whether we release a new major version or keep two projects separate. - [ ] Depending on the results of the discussion, send PR to
react-component/time-pickeror release a new project.
I would appreciate your feedback and any help with testing and optimizing the code.
@kkomelin cannot run your fork 😭
@kkomelin cannot run your fork
@behagoras Why?