Vue.js

{{short description|Open-source JavaScript library for building user interfaces}}

{{Use mdy dates|date=August 2019}}

{{Primary sources|date=July 2019}}

{{Infobox software

| name = Vue.js

| logo = Vue.js Logo 2.svg

| logo_size = 120px

| logo_upright = yes

| author = Evan You

| developer = Evan You and the Core Team{{cite web |url=https://vuejs.org/about/team |title=Vue.js |website=vuejs.org}}

| released = {{Start date and age|2014|2}}{{cite web |url=http://blog.evanyou.me/2014/02/11/first-week-of-launching-an-oss-project/ |title=First Week of Launching Vue.js |website=Evan You |access-date=March 11, 2017 |archive-date=February 5, 2019 |archive-url=https://web.archive.org/web/20190205111451/https://blog.evanyou.me/2014/02/11/first-week-of-launching-an-oss-project/ |url-status=live }}

| latest release version = {{wikidata|property|reference|edit|P348}}

| latest release date = {{Start date and age|{{wikidata|qualifier|P348|P577}}}}

| programming language = TypeScript

| platform = Web platform

| included with = Laravel

| size = 33.9 KB min+gzip{{cite web |title=@vue/runtime-dom v3.2.45 |url=https://bundlephobia.com/package/@vue/runtime-dom |access-date=2023-01-29 |website=Bundlephobia |language=en |archive-date=January 29, 2023 |archive-url=https://web.archive.org/web/20230129213124/https://bundlephobia.com/package/@vue/runtime-dom |url-status=live }}

| genre = JavaScript library

| license = MIT License{{cite web |title=vue/LICENSE |url=https://github.com/vuejs/core/blob/dev/LICENSE |via=GitHub |work=Vue.js |access-date=April 17, 2017}}

}}

Vue.js (commonly referred to as Vue; pronounced "view"{{cite web |title=Introduction |url=https://vuejs.org/guide/introduction.html |website=Vuejs.org |access-date=January 3, 2020 |language=en |archive-date=February 10, 2022 |archive-url=https://web.archive.org/web/20220210104313/https://vuejs.org/guide/introduction.html |url-status=live}}) is an open-source model–view–viewmodel front end JavaScript framework for building user interfaces and single-page applications.{{refn|{{cite book |last1=Macrae |first1=Callum |title=Vue.js: Up and Running: Building Accessible and Performant Web Apps |date=2018 |publisher=O'Reilly Media |isbn=978-1-4919-9721-5 |url=https://books.google.com/books?id=bJpNDwAAQBAJ |language=en |access-date=August 9, 2019 |archive-date=May 30, 2024 |archive-url=https://web.archive.org/web/20240530045409/https://books.google.com/books?id=bJpNDwAAQBAJ |url-status=live}}{{cite book |last1=Nelson |first1=Brett |title=Getting to Know Vue.js: Learn to Build Single Page Applications in Vue from Scratch |year=2018 |publisher=Apress |isbn=978-1-4842-3781-6 |url=https://books.google.com/books?id=mTpsDwAAQBAJ |language=en |access-date=August 9, 2019 |archive-date=May 30, 2024 |archive-url=https://web.archive.org/web/20240530045418/https://books.google.com/books?id=mTpsDwAAQBAJ |url-status=live}}{{cite book |last1=Yerburgh |first1=Edd |title=Testing Vue.js Applications |date=2019 |publisher=Manning Publications |isbn=978-1-61729-524-9 |url=https://books.google.com/books?id=7-FAtAEACAAJ |language=en |access-date=August 9, 2019 |archive-date=May 30, 2024 |archive-url=https://web.archive.org/web/20240530045404/https://books.google.com/books?id=7-FAtAEACAAJ |url-status=live}}{{cite book |last1=Freeman |first1=Adam |title=Pro Vue.js 2 |year=2018 |publisher=Apress |isbn=978-1-4842-3805-9 |url=https://books.google.com/books?id=HQFuDwAAQBAJ |language=en |access-date=August 9, 2019 |archive-date=May 30, 2024 |archive-url=https://web.archive.org/web/20240530045404/https://books.google.com/books?id=HQFuDwAAQBAJ |url-status=live}}{{cite book |last1=Franklin |first1=Jack |last2=Wanyoike |first2=Michael |last3=Bouchefra |first3=Ahmed |last4=Silas |first4=Kingsley |last5=Campbell |first5=Chad A. |last6=Jacques |first6=Nilson |last7=Omole |first7=Olayinka |last8=Mulders |first8=Michiel |title=Working with Vue.js |year=2019 |publisher=SitePoint |isbn=978-1-4920-7144-0 |url=https://books.google.com/books?id=OKScDwAAQBAJ |language=en}}{{Dead link |date=May 2024 |bot=InternetArchiveBot |fix-attempted=yes}}}} It was created by Evan You and is maintained by him and the rest of the active core team members.{{cite web |url=https://vuejs.org/about/team.html |title=Meet the Team |website=Vuejs.org |access-date=September 23, 2019 |language=en |archive-date=February 7, 2022 |archive-url=https://web.archive.org/web/20220207050948/https://vuejs.org/about/team.html |url-status=live}}

Overview

Vue.js features an incrementally adaptable architecture that focuses on declarative rendering and component composition. The core library is focused on the view layer only. Advanced features required for complex applications such as routing, state management and build tooling are offered via officially maintained supporting libraries and packages.{{cite web |url=https://www.patreon.com/evanyou |title=Evan is creating Vue.js |work=Patreon |access-date=March 11, 2017 |language=en |archive-date=March 3, 2019 |archive-url=https://web.archive.org/web/20190303114124/https://www.patreon.com/evanyou |url-status=live }}

Vue.js allows for extending HTML with HTML attributes called directives.{{cite web |url=https://www.w3schools.com/whatis/whatis_vue.asp |title=What is Vue.js |website=W3Schools |access-date=January 21, 2020 |language=en |archive-date=January 22, 2020 |archive-url=https://web.archive.org/web/20200122074512/https://www.w3schools.com/whatis/whatis_vue.asp |url-status=live }} The directives offer functionality to HTML applications, and come as either built-in or user defined directives.

History

Vue was created by Evan You after working for Google using AngularJS in several projects. He later summed up his thought process: "I figured, what if I could just extract the part that I really liked about Angular and build something really lightweight."{{cite news |url=https://betweenthewires.org/2016/11/03/evan-you/ |archive-url=https://web.archive.org/web/20170603052649/https://betweenthewires.org/2016/11/03/evan-you/ |url-status=dead |archive-date=June 3, 2017 |title=Evan You |date=November 3, 2016 |work=Between the Wires |access-date=August 26, 2017 |language=en}} The first source code commit to the project was dated July 2013, at which time it was originally named "Seed".{{Cite book |last1=贾 |first1=志杰 |title=剑指大前端全栈工程师 |last2=史 |first2=广 |last3=赵 |first3=东 |year=2023 |isbn=9787302617594 |language=zh-CN |trans-title=Aspiring Frontend: Full-Stack Engineer}} Vue was first publicly announced the following February, in 2014.{{Cite web |date=2014-02-03 |title=Vue.js: JavaScript MVVM made simple |url=https://news.ycombinator.com/item?id=7169288 |access-date=2023-01-29 |website=Hacker News |archive-date=January 29, 2023 |archive-url=https://web.archive.org/web/20230129215705/https://news.ycombinator.com/item?id=7169288 |url-status=live }}{{Cite web |date=2014-02-11 |title=First Week of Launching Vue.js |url=http://blog.evanyou.me/2014/02/11/first-week-of-launching-an-oss-project/index.html |access-date=2023-01-29 |website=Evan You |archive-date=April 12, 2017 |archive-url=https://web.archive.org/web/20170412110312/http://blog.evanyou.me/2014/02/11/first-week-of-launching-an-oss-project/index.html |url-status=live }}

Version names are often derived from manga and anime series, with the first letters arranged in alphabetical order.

= Versions =

class="wikitable"
VersionRelease dateTitleEnd of LTSEnd of Life
3.5

|{{dts|2024-09-01}}

|Tengen Toppa Gurren Lagann{{cite web |date=September 1, 2024 |title=Announcing Vue 3.5 |url=https://blog.vuejs.org/posts/vue-3-5 |url-status=live |archive-url=https://web.archive.org/web/20240903133340/https://blog.vuejs.org/posts/vue-3-5 |archive-date=September 3, 2024 |access-date=October 25, 2024 |work=Vue.js}}

|

|

3.4

|{{dts|2023-12-28}}

|Slam Dunk{{cite web |title=Announcing Vue 3.4 |url=https://blog.vuejs.org/posts/vue-3-4 |work=Vue.js |access-date=29 March 2024 |date=December 28, 2023 |archive-date=March 24, 2024 |archive-url=https://web.archive.org/web/20240324024208/https://blog.vuejs.org/posts/vue-3-4 |url-status=live }}

|

|

3.3{{dts|2023-05-11}}Rurouni Kenshin{{cite web |url=https://github.com/vuejs/vue-next/releases/tag/v3.3.0 |title=v3.3.0 Rurouni Kenshin |date=May 11, 2023 |via=GitHub |work=Vue.js |access-date=2023-05-12 |language=en |archive-date=December 13, 2023 |archive-url=https://web.archive.org/web/20231213191126/https://github.com/vuejs/core/releases/tag/v3.3.0 |url-status=live }}
3.2{{dts|2021-08-05}}Quintessential Quintuplets{{cite web |url=https://github.com/vuejs/vue-next/releases/tag/v3.2.0 |title=v3.2.0 Quintessential Quintuplets |date=August 5, 2021 |via=GitHub |work=Vue.js |access-date=August 10, 2021 |language=en |archive-date=August 10, 2021 |archive-url=https://web.archive.org/web/20210810001705/https://github.com/vuejs/vue-next/releases/tag/v3.2.0 |url-status=live }}
3.1{{dts|2021-06-07}}Pluto{{cite web |url=https://github.com/vuejs/vue-next/releases/tag/v3.1.0 |title=v3.1.0 Pluto |date=June 7, 2021 |via=GitHub |work=Vue.js |access-date=July 18, 2021 |language=en |archive-date=July 18, 2021 |archive-url=https://web.archive.org/web/20210718094551/https://github.com/vuejs/vue-next/releases/tag/v3.1.0 |url-status=live }}
3.0{{dts|2020-09-18}}One Piece{{cite web |url=https://github.com/vuejs/vue-next/releases/tag/v3.0.0 |title=v3.0.0 One Piece |date=September 18, 2020 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=September 19, 2020 |archive-url=https://web.archive.org/web/20200919013105/https://github.com/vuejs/vue-next/releases/tag/v3.0.0 |url-status=live }}
2.7{{dts|2022-07-01}}Naruto{{cite web |url=https://github.com/vuejs/vue/releases/tag/v2.7.0 |title=v2.7.0 Naruto |date=July 1, 2022 |via=GitHub |work=Vue.js |access-date=July 1, 2022 |language=en |archive-date=July 1, 2022 |archive-url=https://web.archive.org/web/20220701141335/https://github.com/vuejs/vue/releases/tag/v2.7.0 |url-status=live }}{{dts|2023-12-31}}{{dts|2023-12-31}}
2.6{{dts|2019-02-04}}Macross{{cite web |url=https://github.com/vuejs/vue/releases/tag/v2.6.0 |title=v2.6.0 Macross |date=February 4, 2019 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=November 11, 2020 |archive-url=https://web.archive.org/web/20201111182125/https://github.com/vuejs/vue/releases/tag/v2.6.0 |url-status=live }}{{dts|2022-03-18}}{{dts|2023-09-18}}
2.5{{dts|2017-10-13}}Level E{{cite web |url=https://github.com/vuejs/vue/releases/tag/v2.5.0 |title=v2.5.0 Level E |date=October 13, 2017 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=September 18, 2020 |archive-url=https://web.archive.org/web/20200918170329/https://github.com/vuejs/vue/releases/tag/v2.5.0 |url-status=live }}
2.4{{dts|2017-07-13}}Kill la Kill{{cite web |url=https://github.com/vuejs/vue/releases/tag/v2.4.0 |title=v2.4.0 Kill la Kill |date=July 13, 2017 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=November 9, 2020 |archive-url=https://web.archive.org/web/20201109042137/https://github.com/vuejs/vue/releases/tag/v2.4.0 |url-status=live }}
2.3{{dts|2017-04-27}}JoJo's Bizarre Adventure{{cite web |url=https://github.com/vuejs/vue/releases/tag/v2.3.0 |title=v2.3.0 JoJo's Bizarre Adventure |date=April 27, 2017 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=November 11, 2020 |archive-url=https://web.archive.org/web/20201111192047/https://github.com/vuejs/vue/releases/tag/v2.3.0 |url-status=live }}
2.2{{dts|2017-02-26}}Initial D{{cite web |url=https://github.com/vuejs/vue/releases/tag/v2.2.0 |title=v2.2.0 Initial D |date=February 26, 2017 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=April 13, 2021 |archive-url=https://web.archive.org/web/20210413135052/https://github.com/vuejs/vue/releases/tag/v2.2.0 |url-status=live }}
2.1{{dts|2016-11-22}}Hunter × Hunter{{cite web |url=https://github.com/vuejs/vue/releases/tag/v2.1.0 |title=v2.1.0 Hunter X Hunter |date=November 22, 2016 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=November 8, 2020 |archive-url=https://web.archive.org/web/20201108094602/https://github.com/vuejs/vue/releases/tag/v2.1.0 |url-status=live }}
2.0{{dts|2016-09-30}}Ghost in the Shell{{cite web |url=https://github.com/vuejs/vue/releases/tag/v2.0.0 |title=v2.0.0 Ghost in the Shell |date=September 30, 2016 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=October 27, 2020 |archive-url=https://web.archive.org/web/20201027193218/https://github.com/vuejs/vue/releases/tag/v2.0.0 |url-status=live }}
1.0{{dts|2015-10-27}}Evangelion{{cite web |url=https://github.com/vuejs/vue/releases/tag/1.0.0 |title=1.0.0 Evangelion |date=October 27, 2015 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=April 13, 2021 |archive-url=https://web.archive.org/web/20210413114912/https://github.com/vuejs/vue/releases/tag/1.0.0 |url-status=live }}
0.12{{dts|2015-06-12}}Dragon Ball{{cite web |url=https://github.com/vuejs/vue/releases/tag/0.12.0 |title=0.12.0: Dragon Ball |date=June 12, 2015 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=April 13, 2021 |archive-url=https://web.archive.org/web/20210413135200/https://github.com/vuejs/vue/releases/tag/0.12.0 |url-status=live }}
0.11{{dts|2014-11-07}}Cowboy Bebop{{cite web |url=https://github.com/vuejs/vue/releases/tag/0.11.0 |title=v0.11.0: Cowboy Bebop |date=November 7, 2014 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=April 13, 2021 |archive-url=https://web.archive.org/web/20210413135213/https://github.com/vuejs/vue/releases/tag/0.11.0 |url-status=live }}
0.10{{dts|2014-03-23}}Blade Runner{{cite web |url=https://github.com/vuejs/vue/releases/tag/v0.10.0 |title=v0.10.0: Blade Runner |date=March 23, 2014 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=April 13, 2021 |archive-url=https://web.archive.org/web/20210413135244/https://github.com/vuejs/vue/releases/tag/v0.10.0 |url-status=live }}
0.9{{dts|2014-02-25}}Animatrix{{cite web |url=https://github.com/vuejs/vue/releases/tag/v0.9.0 |title=v0.9.0: Animatrix |date=February 25, 2014 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=April 13, 2021 |archive-url=https://web.archive.org/web/20210413115026/https://github.com/vuejs/vue/releases/tag/v0.9.0 |url-status=live }}
0.8{{dts|2014-01-27}}{{n/a}}{{cite web |url=https://github.com/vuejs/vue/releases/tag/v0.8.0 |title=v0.8.0 |date=January 27, 2014 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=April 13, 2021 |archive-url=https://web.archive.org/web/20210413114929/https://github.com/vuejs/vue/releases/tag/v0.8.0 |url-status=live }}colspan="2" | first version publicly announced
0.7{{dts|2013-12-24}}{{n/a}}{{cite web |url=https://github.com/vuejs/vue/releases/tag/v0.7.0 |title=v0.7.0 |date=December 24, 2013 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=April 13, 2021 |archive-url=https://web.archive.org/web/20210413114747/https://github.com/vuejs/vue/releases/tag/v0.7.0 |url-status=live }}
0.6{{dts|2013-12-08}}VueJS{{cite web |url=https://github.com/vuejs/vue/releases/tag/0.6.0 |title=0.6.0: VueJS |date=December 8, 2013 |via=GitHub |work=Vue.js |access-date=September 23, 2020 |language=en |archive-date=April 13, 2021 |archive-url=https://web.archive.org/web/20210413134939/https://github.com/vuejs/vue/releases/tag/0.6.0 |url-status=live }}

When a new major is released i.e. v3.y.z, the last minor i.e. 2.x.y will become a LTS release for 18 months (bug fixes and security patches) and for the following 18 months will be in maintenance mode (security patches only).{{cite web |url=https://github.com/vuejs/roadmap |title=Vue Roadmap |via=GitHub |work=Vue.js |date=November 6, 2022 |language=en |access-date=December 10, 2021 |archive-date=December 10, 2021 |archive-url=https://web.archive.org/web/20211210095019/https://github.com/vuejs/roadmap |url-status=live }}

Features

= Components =

Vue components extend basic HTML elements to encapsulate reusable code. At a high level, components are custom elements to which the Vue's compiler attaches behavior. In Vue, a component is essentially a Vue instance with pre-defined options.{{cite web |url=https://vuejs.org/guide/essentials/component-basics.html |title=Components |website=Vuejs.org |access-date=March 11, 2017 |language=en |archive-date=February 10, 2022 |archive-url=https://web.archive.org/web/20220210121233/https://vuejs.org/guide/essentials/component-basics.html |url-status=live }}

The code snippet below contains an example of a Vue component. The component presents a button and prints the number of times the button is clicked:

= Templates =

Vue uses an HTML-based template syntax that allows binding the rendered DOM to the underlying Vue instance's data. All Vue templates are valid HTML that can be parsed by specification-compliant browsers and HTML parsers. Vue compiles the templates into virtual DOM render functions. A virtual Document Object Model (or "DOM") allows Vue to render components in its memory before updating the browser. Combined with the reactivity system, Vue can calculate the minimal number of components to re-render and apply the minimal amount of DOM manipulations when the app state changes.

{{cite news |last1=Jordan |first1=John |title=Vue Admin Template |url=https://themeselection.com/item/category/vuejs-admin-templates/ |access-date=16 July 2022}}

Vue users can use template syntax or choose to directly write render functions using hyperscript either through function calls or JSX.{{cite web |url=https://vuejs.org/guide/essentials/template-syntax.html |title=Template Syntax |website=Vuejs.org |access-date=March 11, 2017 |language=en |archive-date=February 10, 2022 |archive-url=https://web.archive.org/web/20220210105315/https://vuejs.org/guide/essentials/template-syntax.html |url-status=live }} Render functions allow applications to be built from software components.{{cite web |url=https://medium.com/the-vue-point/vue-2-0-is-here-ef1f26acf4b8#77d9 |title=Vue 2.0 is Here! |date=September 30, 2016 |website=The Vue Point |access-date=March 11, 2017 |archive-date=March 12, 2017 |archive-url=https://web.archive.org/web/20170312072632/https://medium.com/the-vue-point/vue-2-0-is-here-ef1f26acf4b8#77d9 |url-status=live }}

= Reactivity =

Vue features a reactivity system that uses plain JavaScript objects and optimized re-rendering. Each component keeps track of its reactive dependencies during its render, so the system knows precisely when to re-render, and which components to re-render.{{cite web |url=https://vuejs.org/guide/extras/reactivity-in-depth.html |title=Reactivity in Depth |website=Vuejs.org |access-date=March 11, 2017 |language=en |archive-date=February 10, 2022 |archive-url=https://web.archive.org/web/20220210105118/https://vuejs.org/guide/extras/reactivity-in-depth.html |url-status=live }}

= Transitions =

Vue provides a variety of ways to apply transition effects when items are inserted, updated, or removed from the DOM. This includes tools to:

  • Automatically apply classes for CSS transitions and animations
  • Integrate third-party CSS animation libraries, such as Animate.css
  • Use JavaScript to directly manipulate the DOM during transition hooks
  • Integrate third-party JavaScript animation libraries, such as Velocity.js

When an element wrapped in a transition component is inserted or removed, this is what happens:

  1. Vue will automatically sniff whether the target element has CSS transitions or animations applied. If it does, CSS transition classes will be added/removed at appropriate timings.
  2. If the transition component provided JavaScript hooks, these hooks will be called at appropriate timings.
  3. If no CSS transitions/animations are detected and no JavaScript hooks are provided, the DOM operations for insertion and/or removal will be executed immediately on next frame.{{cite web |url=https://vuejs.org/guide/built-ins/transition.html |title=Transition Effects |website=Vuejs.org |access-date=March 11, 2017 |language=en |archive-date=December 13, 2023 |archive-url=https://web.archive.org/web/20231213191121/https://vuejs.org/guide/built-ins/transition.html |url-status=live }}{{cite web |url=https://vuejs.org/guide/extras/animation.html |title=Transitioning State |website=Vuejs.org |access-date=March 11, 2017 |language=en |archive-date=February 10, 2022 |archive-url=https://web.archive.org/web/20220210105126/https://vuejs.org/guide/extras/animation.html |url-status=live }}

= Routing =

A traditional disadvantage of single-page applications (SPAs) is the inability to share links to the exact "sub" page within a specific web page. Because SPAs serve their users only one URL-based response from the server (it typically serves index.html or index.vue), bookmarking certain screens or sharing links to specific sections is normally difficult if not impossible. To solve this problem, many client-side routers delimit their dynamic URLs with a "hashbang" (#!), e.g. page.com/#!/. However, with HTML5 most modern browsers support routing without hashbangs.

Vue provides an interface to change what is displayed on the page based on the current URL path – regardless of how it was changed (whether by emailed link, refresh, or in-page links). Additionally, using a front-end router allows for the intentional transition of the browser path when certain browser events (i.e. clicks) occur on buttons or links. Vue itself doesn't come with front-end hashed routing. But the open-source "vue-router" package provides an API to update the application's URL, supports the back button (navigating history), and email password resets or email verification links with authentication URL parameters. It supports mapping nested routes to nested components and offers fine-grained transition control. With Vue, developers are already composing applications with small building blocks building larger components. With vue-router added to the mix, components must merely be mapped to the routes they belong to, and parent/root routes must indicate where children should render.{{cite web |url=https://vuejs.org/guide/scaling-up/routing.html |title=Routing |website=Vuejs.org |access-date=March 11, 2017 |language=en |archive-date=February 10, 2022 |archive-url=https://web.archive.org/web/20220210105119/https://vuejs.org/guide/scaling-up/routing.html |url-status=live }}

{{syntaxhighlight|lang=vue|code=

...

}}

The code above:

  1. Sets a front-end route at websitename.com/user/.
  2. Which will render in the User component defined in (const User...)
  3. Allows the User component to pass in the particular id of the user which was typed into the URL using the $route object's params key: $route.params.id.
  4. This template (varying by the params passed into the router) will be rendered into inside the DOM's div#app.
  5. The finally generated HTML for someone typing in: websitename.com/user/1 will be:

{{syntaxhighlight|lang=html|code=

User 1

}}

{{cite web |last1=You |first1=Evan |title=Vue Nested Routing (2) |url=https://router.vuejs.org/en/essentials/nested-routes.html |website=Vue Home Page (subpage) |access-date=May 10, 2017 |archive-date=May 8, 2017 |archive-url=https://web.archive.org/web/20170508221910/http://router.vuejs.org/en/essentials/nested-routes.html |url-status=dead }}

Ecosystem

The core library comes with tools and libraries both developed by the core team and contributors.

= Official tooling =

  • Devtools – Browser devtools extension for debugging Vue.js applications
  • Vite – Standard Tooling for rapid Vue.js development
  • Vue Loader – a webpack loader that allows the writing of Vue components in a format called Single-File Components (SFCs)

= Official libraries =

  • Vue Router – The official router, suitable for building SPAs
  • Pinia – The official state management solution

= Video Courses =

  • Vue School – Expert-led courses on Vue.js and its ecosystem.{{Cite web |title=Vue School {{!}} The #1 source for learning Vue.js from experts |url=https://vueschool.io/ |access-date=2024-12-24 |website=Vue School |language=en}}

Comparison with other frameworks

JavaScript-based web application frameworks, such as Vue, provide extensive capabilities but come with associated trade-offs. These frameworks often extend or enhance features available through native web technologies, such as routing, component-based development, and state management. While native web standards, including Web Components, modern JavaScript APIs like Fetch and ES Modules, and browser capabilities like Shadow DOM, have advanced significantly, frameworks remain widely used for their ability to enhance developer productivity, offer structured patterns for large-scale applications, simplify handling edge cases, and provide tools for performance optimization. {{Cite book |title=JavaScript Frameworks for Modern Web Development: The Essential Frameworks, Libraries, and Tools to Learn Right Now |isbn=978-1484249949}}{{Cite book |title=Building Native Web Components: Front-End Development with Polymer and Vue.js |isbn=978-1484259047}}{{Cite book |title=Hands-On JavaScript High Performance: Build faster web apps using Node.js, Svelte.js, and WebAssembly |isbn=978-1838821098}}

Frameworks can introduce abstraction layers that may contribute to performance overhead, larger bundle sizes, and increased complexity. Modern frameworks, such as Vue 3, address these challenges with features like concurrent rendering, tree-shaking, and selective hydration. While these advancements improve rendering efficiency and resource management, their benefits depend on the specific application and implementation context. Lightweight frameworks, such as Svelte and Preact, take different architectural approaches, with Svelte eliminating the virtual DOM entirely in favor of compiling components to efficient JavaScript code, and Preact offering a minimal, compatible alternative to React. Framework choice depends on an application’s requirements, including the team’s expertise, performance goals, and development priorities.

A newer category of web frameworks, including enhance.dev, Astro, and Fresh, leverages native web standards while minimizing abstractions and development tooling. {{Cite web |title=Enhance |website=GitHub |url=https://github.com/enhance-dev }}{{Cite web |title=Astro framework |website=GitHub |url=https://github.com/withastro/astro }}{{Cite web |title=Fresh |website=GitHub |url=https://github.com/denoland/fresh }} These solutions emphasize progressive enhancement, server-side rendering, and optimizing performance. Astro renders static HTML by default while hydrating only interactive parts. Fresh focuses on server-side rendering with zero runtime overhead. Enhance.dev prioritizes progressive enhancement patterns using Web Components. While these tools reduce reliance on client-side JavaScript by shifting logic to build-time or server-side execution, they still use JavaScript where necessary for interactivity. This approach makes them particularly suitable for performance-critical and content-focused applications.

See also

Sources

{{Free-content attribution

|title= Vue.js Guide

|author = Vue.js

|documentURL= https://vuejs.org/guide/introduction.html

|license statement URL= https://github.com/vuejs/vuejs.org/blob/fdc66945e18020cdbdc729fd7ab8005d123216a7/LICENSE

|license= MIT License

}}

References

{{reflist}}