Replies: 3 comments · 2 replies
-
|
Hi @enfipy, welcome to the forums.
They are really quite different libraries once you go beyond the basic HTML-over-the-wire concept. Here are some differences that affect file size:
Most of it is batteries-included. Currently the only optional features are We may offer some way of plugin system in the future, although it's not a priority. It should be noted that plugin system is not free in terms of complexity an will increase the file size of the full system. All code needs to handle a plugin being both present or absent, and plugins still require code in the core to integrate. E.g. when "animation" is an optional packages, all other packages still need to handle the fact that fragment updates might be async, ignore fragments in an exit animation, etc. The progress bar is actually an example that could be extracted quite easily, because it only uses existing events and has no other integrations with the rest of the library.
Again with the caveat of comparing things that are fundamentally different, but a typical React app is going to bundle more than that (Router, API client, state management, styling solution, etc.). |
Beta Was this translation helpful? Give feedback.
-
|
The loading indicator was a (IMHO) great default UX experience improvement. I could see it as a plugin, but I think it would be a net negative overall since I suspect it's not contributing that much to the overall bundle size. Henning outlined the bundle sizing a lot more beautifully than I think I could have. For many of the applications I build, they don't grow much more than Unpoly + a handful of compilers. Not to say that we shouldn't concern ourselves with bundle sizing and optimizations, but if I do happen to bring in other libraries to my application, Unpoly sits about middle in terms of sizing. Example: |
Beta Was this translation helpful? Give feedback.
-
|
many thanks for bringing up this discussion and all the thoughts in the answers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there, I want to start by saying that this library looks absolutely lovely and powerful, and I really appreciate the work you did.
I was comparing the HTMX and Unpoly and found it almost in every aspect win against HTMX. But one thing I noticed is the current base size of the library: 48.7 KB gzipped. While Unpoly is relatively small it's still pretty big in comparison with: HTMX is ~14k min.gz’d, Alpine is ~10k min.gz'd, React + ReactDOM is ~45k min.gz'd, Vue 3 is ~35k min.gz'd.
So my questions are these:
P.S.: I know that size optimizations are probably not on the list of first priority, so I just want to know the thoughts of the team.
Beta Was this translation helpful? Give feedback.
All reactions