Hello there!
Weight of your client side bundle is very important for best user experience. Users do not like to wait. For this purpose I am interesting to find tiny analogs of most popular libraries. I know next ones:
- react => preact
- redux => storeon
- moment => dayjs
- react-intl => eo-locale
- react-router => wouter
- react-apollo => urql
Do you know something else?
Top comments (23)
Bootstrap ➡️ Spectre / Bulma
Webpack ➡️ Parcel
Jquery ➡️ Nothing
TypeScript ➡️ Nim
lodash -> micro-dash
jQuery -> cash
styled-components -> goober
React -> Svelte 😛
Hey Nuno, thanks for the shout-out! 👍🙂
Also about
dayjs
, is it one of the smallest datetime library around?Anyways, if I want no library, nothing works better than
You can also look to date-fns. It has good tree shaking support.
If I am looking for python-dateutil.parser.parse in JavaScript of DateTime string of unknown format; what is the best library, for both Node.js environment and Webpack / Parcel environment?
Also, looking for How to construct a timedelta object from a simple string
new Date(dateString) does do a pretty good job at parsing on most browsers, but will favor the system locale when MM/dd/yyyy or dd/mm/yyyy is indeterminate.
+1 for date-fns. As well, the moment folks also create a more lighter weight, tree shakeable version called luxon.
moment / luxon
⏱ A library for working with dates and times in JS
Luxon
Luxon is a library for working with dates and times in Javascript.
Features
Download/install
Download/install instructions
Documentation
Development
See contributing.
Yup. MomentJS seems to be the most popular library in this space and it's SOOOOO big.
MomentJS (65.9k gzipped) => DayJS (2.8k gzipped)
lodash -> lodash-es
lodash-es -> clone-deep if only cloning needed
Amazing!
fclone ;-)
For forms Hooked-form
Also for urql there's now an implementation that just integrates with Preact, Preact-urql
I completely agree with this. The web needs to get lighter and easier to navigate especially as new countries begin to get online!
Always felt the big libs/frameworks were overkill for most sites.
For building small sites, I created github.com/Ravavyr/taino-js [Check the README for the 4 step setup]
It's open for anyone to play with, i'm in the process of creating sample sites that are actually fully built sites to use as tutorials since that's something the frameworks have been terrible at doing too. Also SEO functionality and routing are built in. Zero NPM installs. You need live-server or whatever you use to run a SPA and point it to index.html. Try it it out and if you do i'd love some feedback :)
It's used on taino.netlify.com [though netlify is apparently down right now]
swiper.js 128k minified >
Bootstrap > plain CSS/CSS3 😛
Thanks Maxim, that's a nice bunch of suggestions!
This is a bit out of date, but some decent little nuggets in there :
microjs
Yep, very cool project. Unfortunately last merge requests stuck.
jquery => cash / cash-dom
cash-dom also is written in TypeScript.
bootstrap => bulma
Perfect!
Some comments may only be visible to logged-in visitors. Sign in to view all comments.