Is Vue Becoming Even Faster?

Posted by


Vue is a popular JavaScript framework that is known for its fast performance and easy-to-use syntax. And now, it’s getting even faster with the release of Vue 3.0! In this tutorial, we’ll take a look at some of the new features and improvements in Vue 3.0 that make it even faster than before.

One of the key improvements in Vue 3.0 is the introduction of the new Composition API. This API allows developers to organize their code in a more modular and reusable way, which can help improve performance by reducing duplicate code and improving the overall structure of the application. The Composition API also allows for more efficient management of reactivity, which can lead to faster updates and rendering of components.

Another improvement in Vue 3.0 is the revamped reactivity system. Vue 3.0 introduces a new reactivity model that is more efficient and performant than the previous version. This new reactivity system allows for better tracking of dependencies and more optimized updates, which can result in faster rendering of components and better overall performance.

In addition to the new Composition API and revamped reactivity system, Vue 3.0 also includes several other performance optimizations. For example, Vue 3.0 now uses a more efficient virtual DOM implementation that can reduce the amount of work required to update the DOM when changes are made to the data. This can lead to faster DOM updates and improved performance overall.

Another optimization in Vue 3.0 is the improved static tree hoisting. This optimization allows Vue to more efficiently handle statically-analyzed trees of components, which can result in faster rendering and improved performance for applications with a large number of components.

Overall, Vue 3.0 is faster and more performant than ever before, thanks to a range of new features and improvements that have been introduced in this release. If you’re looking to improve the performance of your Vue applications, upgrading to Vue 3.0 is definitely worth considering.

To get started with Vue 3.0, you can install it using npm or yarn by running the following command:

npm install vue@next

Or if you prefer using yarn:

yarn add vue@next

Once you’ve installed Vue 3.0, you can start using it in your projects and take advantage of the improved performance and new features that it offers. Happy coding!

0 0 votes
Article Rating

Leave a Reply

36 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
@bitmazing6465
2 hours ago

Hey, GalacticHypernova here. Thank you so much for showcasing my PR! This was definitely a surprise, but a pleasant one at that. A couple of things that I wanted to add to that I think are worth mentioning:
1. The hydrate prop, for the most part, is optional. Most of the strategies have sensible defaults, and the hydrate prop could be used for fine-tuning triggers. For example, event based delayed hydration by default has the mouseover event, but as you showcased, it can be overridden into a click, and it can also contain multiple events.
2. Some other common use cases (seeing as you stated "only hydrating components when they're visible on screen") could be forms, static content, dependencies (will explain in this comment), and more. Forms that might or might not be immediately visible but have complex structures with a lot of elements could benefit from event-based hydration (for example, first focus). Static content, pretty self-explanatory, could benefit from the never hydrated strategy, which is also a thing now. There is also a way now to chain components logic like dependencies (where one component depends on another's hydrated state) via the @hydrated emit and the conditional hydration. While it is indeed intended to be used sparingly and correctly (which there is a whole section about in the new documentation), there are legitimate use cases, but they do require careful planning to avoid unexpectedly hurting performance more than improving it.
3. Just to clear all doubts, it was a draft PR because I have been doing a lot of local testing and getting rid of edge cases. The barebones functionality has been there for a good while, but I didn't want to get a semi-stable feature out without extensively checking every part, even though it will be opt-in and experimental by default. It's been battle tested in possibly every possible scenario. That is the reason it stayed a draft for so long. It was not because it was far from ready. I'm just not one to submit my work too quickly, I like to take my time with quality over quantity 😅

Although I hate to disappoint, the eager component fetching is a Vue limitation as part of their native implementation. For now it also affects the Nuxt implementation, but I am looking into a way to handle this.

All in all, great video! Keep it up! 🙏

@ilhamlutfi5815
2 hours ago

so excited, i use vue js with Laravel Inertia Js. It's simple and fast development for modern monolith web

@Filipp1139
2 hours ago

What about your vue course? Any progress?

@codestuff3685
2 hours ago

great video as always

@CreativeB34ST
2 hours ago

That last line "as soon as possible" should have been "as soon as needed". Cause "as soon as possible is "eager" loading, not "lazy loading".

@tomu_sange
2 hours ago

This is qwiks Resumability

@studiowebselect
2 hours ago

It was the big selling point of qwick.js

@CaseyCarroll42
2 hours ago

Great summary and examples. Excited for built-in lazy hydration in Vue!

@xucongzhan9151
2 hours ago

May I ask about the typeface used at 2:01? I swear I have seen it before, but I just can't put my finger on it…

@RAlsta
2 hours ago

Every day I make sure that all these (only) frontend frameworks are better suited for app interfaces than websites. And htmx + altinejs + go just kill everyone in the balance of simplicity, reactiveness and performance

@randomlettersqzkebkw
2 hours ago

Sadly, what i want from Vue is
SSG. Build static parts of my site at BUILD time. And the rest can hydrate when the app loads. That way, i can select parts of my app to be static at build time, and leave the others to just behave like it normally does. Everyone i ask for this only says "use nuxt bro" as if any one can just take their insanely hude vue app and change it over to a framework that is structured differently.

@ZyncInteractive
2 hours ago

Yay, you're back!!

@виртуоз_ру
2 hours ago

👍👍👍👍👍👍

@marianivanov6431
2 hours ago

vue = hydration problem. solve <ClientOnly></ClientOnly> thats it

@ralacerda12
2 hours ago

Amazing. I'm specially excited for hydrating based on media queries. Right now it's pretty annoying to deal with Mobile-only or desktop-only components, you endup with everything duplicated, even if you'll show only one of those components

@winns.x
2 hours ago

WoW! Thats look great, can't wait to try it out!

@burimdervisholli6379
2 hours ago

I personally dont like it, it makes things more complicated and I dont see a real case scenario for it, vue was know and loved because it was easy to learn and thats changing

@naranyala_dev
2 hours ago

we need healthy meta-framework battle for vue based meta-framework, nuxt challenger

@TheAlexLichter
2 hours ago

Secret Pooya and @danielroe cameo at 4:565:00 😛

@DejaVueFm
2 hours ago

So happy to see what Evan teased earlier became reality 🔥

36
0
Would love your thoughts, please comment.x
()
x