Evan You, creator of Vue, Vite, and Rolldown, shares the journey of Vue.js from a side project to a comprehensive framework. Topics include the Composition API, Vue 2's development, Options API vs Composition API, sustainability of PetitVue, and the transition to Vue 3. Insights on Vue's evolution, lightweight alternatives, and the shift towards single-page applications are also discussed.
Vue.js started as a side project by Evan You at Google, evolving over 10 years.
Transition from Vue 2 to Vue 3 highlighted the introduction and benefits of Composition API.
Balancing support for Options API and Composition API shows Vue's commitment to diverse developer needs.
Deep dives
Vue's Evolution Over 10 Years
Vue has evolved over a decade with dedication from the creator, Evan, starting as a side project and blossoming into a comprehensive framework. It began with the initiative to make Vue useful for others, attracting a growing user base. There was a shift towards full-time development in 2016, leading to the expansion of Vue's scope, including single-page routing, state management, and toolchain build tools.
Transition to Full-Time Open Source
Evan's decision to work full-time on Vue was a risky one initially, fueled by a passion for the project's potential. Vue's sponsorship gradually grew, facilitating full-time open-source dedication. Despite uncertainties, this shift proved to be a transformative and rewarding decision in Evan's career, highlighting the success and sustainability of Vue's development.
The Impact of Catering to User Preferences
Vue's approach of catering to different user preferences, ranging from options API to composition API, reflects a commitment to diverse developer needs. The composition API's introduction aimed to address type inference challenges and provide a more flexible, TypeScript-friendly choice for advanced users. The options API remains supported alongside the composition API to accommodate varying project requirements.
Challenges with Alternative API Approaches
Experiments with class-based API and decorators presented challenges due to evolving specifications and TypeScript support. While class components and reactivity work in specific scenarios, edge cases like private fields or reactivity in constructors can cause complications. The preference for function-scoped declarations is advised to avoid pitfalls, although class usage is feasible with awareness of potential issues.
Maintaining Balance Between API Options
Vue's continued support for options API alongside the composition API aims to strike a balance between providing flexibility and simplifying the developer experience. The composition API's focus on logic reuse and type inference enhances maintainability and code organization, offering a powerful alternative. Plans for future updates, such as setting a default API choice, reflect a commitment to streamlining the development process while accommodating diverse developer preferences.
This DejaVue episode is special - Alex and Michael meet up with the creator of Vue, Vite and Rolldown, Evan You himself and talk about the last ten years of Vue!
Starting with how Vue.js started as a side project while Evan still worked at Google, Evan shares the story of how Vue.js came to be and how it evolved over the years. Interesting insights, such as why the Composition API was created and which initial problems should be solved with it, are shared in this episode. And to all that, questions from the Q&A were answered as well, touching topics like petite-vue, if and how the Options API will persist and how opinionated Vue.js is.
After an hour of content and insights, the episode ends with a tiny cliffhanger, as Part Two of the conversation covering the future of Vue, possible Vue 4 features, Vapor mode, Vue 3.5 and more, will be released next week!
Enjoy the episode!
Chapters
(00:00) - Welcome to DejaVue!
(01:09) - How did Vue.js start out?
(04:48) - The Initial Version of Vue.js
(13:42) - Do new Vue users start without a build step?
(15:02) - Vue's expansion to different use cases
(18:14) - Is Petite Vue dead?
(21:03) - Why Vue 2?
(29:58) - How opinionated is Vue?
(35:15) - The Transition from Vue 2 to Vue 3
(36:32) - How did the idea for the Composition API came up?
(38:24) - Options API vs Composition API
(44:54) - Will the Options API stick around?
(46:10) - Overhead of keeping APIs around
(51:13) - Considering to disable Options API via a flag?