Vue 3 - One Piece

Photo by Yancy Min on Unsplash

By now, most front-end developers would have come to know about the release of the new version of Vue.
Looking back, the Vue team has made its announcement on its work for creating the next version of its framework (Vue-3) exactly 2 years ago on September, 2018. Even before that, Evan You was creating the prototypes, imagining the features, and structures of Vue 3. He was testing and playing with a lots of new things, tried Typescript, and also thought of using the most talked architecture, the Monorepo setup. By then he realized, to add these and to implement these prototypes, he should rewrite everything from scratch once again, which he actually did.

...

The Typescript Jungle

He and his team rewrote the entire framework in Typescript. In fact, it was the first time, Evan was working on Typescript for such a big project. Vue, which already supports Typescript, now being written in Typescript itself, will be more compatible to it.

So, at once when the basic prototype was set, the team started to explore things that could be added to Vue framework like Class based API, React hooks, Typescript support, Time slicing etc.

A many of these features didn't end up going into the final version - Evan You.

But, as a whole, in the design and development process, the community involvement was really huge. There were few RFC's conducted, to grab ideas, to hear feedback and more. Because, the team personally felt if there is going to be some really big breaking changes, it is good to bring it to public and let them know. Which, I really felt, is a very good move. Few people were against deprecating some features, few people were very eager to see what's new in this version in those RFC's. Bringing the whole project to public made the thread with hundreds and hundreds of comments.

By then we realized, GitHub is not actually that good for organizing this huge scale of discussion. - Evan You.

...

The Breakthrough

So, after getting inputs from community, the team felt they are just revamping the old code, and they are not bringing anything new or exciting. They are not making breakthroughs. And also, Vue 2 at them time was fair enough to satisfy the developer's needs and to compete with other giant frameworks. So, they need not rush. The team took a step back and started to research on what could be brought into the party.

And after some research and an one more RFC, they brought in Function API to the party, which is today's Composition API.

Talking about Composition API, it is need of the hour for big companies thinking of adopting Vue in their front-end architecture. And the good thing is, it is absolutely optional. Composition API didn't make the Options API get deprecated. Small projects could make use of Options API, which would be more than enough, and large projects, definitely need Composition API for making their code base clean and non repeated.

Next to Composition API, Vue 3 update also includes of bringing in Vue portal, which was originally developed as an independent library named portal-vue by Linusborg, member of Vue core team, Vue fragments, and much more interesting features.

And apart from these new Features, Vue 3 has also brought in minor changes to existing code, syntax and usage. Be sure to check the official Vue Migration guide.

And also, Evan, in his Vue 3 keynote took time to appreciate the entire Vue community.

To the Vue community:
Thank you!

...

Should you switch to Vue 3?

Be sure to check the new features, implement it in your projects, and bring some good music into the party. But, there is a disclaimer, there will be lots of issues in any initial version of release to be addressed. And also a lot of different libraries you are using is to be made Vue 3 compatible, which all takes time. Evan You, himself suggested to continue using Vue 2 till there are support made available in all the other libraries which supports Vue.

...

 Vue 4?

And, to the final question. When is Vue 4?

Evan, himself said, Vue 4 is not planned for any near feature. They have already made ton of changes and rewrote the entire code base from ground up, which makes it stable for next 4 to 5 years. So, we can be sure that, as like Vue 2, which is rocking now for more than 4 years, Vue 3 will be there for same or even more period of time.

 

So, that's it from me today. Do let me know, what's your thoughts on Vue 3!

Till then, happy Vue_ing!

- Balaji SV

Comments