Interesting. I use full Vue for this quite a lot, mount onto specific DOM points, replace their content with (most commonly) an enhanced form, or a data table. Works well, costs 30Kb plus compat layers. You can argue all day long about the cost of 30Kb, but then you put a 200Kb image in your header.<p>Anyway, looking at the docs, my approach wouldn't be as easy in vue-petite. It looks like Components have been functionally gutted. You can still approximate something, but you seem to lose a lot of ecosystem benefits of Vue. Theirs looks great for<p>Ultimately, this all seems like something coverage and tree-shaking <i>should</i> be able to do. If you're only using 5Kb of Vue, only 5Kb should be bundled. One day, eh? Until then, is the additional 25Kb actually hurting your users?
If anyone of you guys have access to Vue mastery watch the tutorial where Evan creates a mini-version of Vue js in vanilla JS in like 15 minutes.<p>He also explains some of the Vue optimization tricks like why they ditched the nested JSON and how Vue caches the @click handlers, etc so they don't need to check this on every digest cycle.<p>I wish there was a free version to link here. Really interesting stuff, shows you how much thought and effort is put in by the creators to optimise so many little things which us users of the framework never even notice is happening.
This progressive enhancement is exactly why I prefer Vue and find it so productive. 95% of apps are best built as server-side rendered with reactivity on top of each page as needed (instead of the JS/SPA monstrosities we have today).<p>Nice to see an even lighter version optimized for this use-case.
There's also Alpine.js which is trying to be a simpler version of Vue. It even uses Vue's reactivity engine.
<a href="https://alpinejs.dev/" rel="nofollow">https://alpinejs.dev/</a>
That could be the perfect solution for my Rails dev. Sprinkling views with Vue feels more natural and in line with Rails philosophy for me than the pseudo SPA approach of Stimulus. I hope it will gain traction in the community.
htmx + petit-vue + tailwind lets your write your entire site in a modern way without leaving your html file.<p>Now, it may result in an unmaintainable mess in the long run, there is always a threshold for those things.
We’ve been using Vue for a while now at Parq.<p>We initially wanted to use it as a super powered jQuery, then we ended up using Vue as an SPA for part of our app (certain route served a Vue spa to users), now we are going all into the Vue ecosystem for SPA.<p>I’m a fan of using Vue incrementally, but what you will find is that no editors I have found support Vue inside html templates well. When you use Vue as a jQuery replacement, it gives you some nicety, but it ends having pretty gnarly strings to put html inside of Vue components.<p>Vue team, if you can get editors to support your string template syntax, that would be killer. Even better, if there was a way to use single file components without the full build step (I.e. bundle up single file components the first time they are needed by a client) and inject that right into the html template that would be amazing.
There is also Litedom (which I created) that's in the same ballpark:<p><a href="https://github.com/mardix/litedom" rel="nofollow">https://github.com/mardix/litedom</a>
By using this, how do you prevent the initial render (before js runs) the blink showing the user the raw template? That's a big drawback, isn't it?