Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Vue.js: Understanding its Tools and Ecosystem

You're reading from   Vue.js: Understanding its Tools and Ecosystem Take a crash course in the main concepts and syntax of the Vue.js library

Arrow left icon
Product type Paperback
Published in Nov 2019
Publisher
ISBN-13 9781800206625
Length 194 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Dave Berning Dave Berning
Author Profile Icon Dave Berning
Dave Berning
Backstop Media LLC Backstop Media LLC
Author Profile Icon Backstop Media LLC
Backstop Media LLC
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface
1. Getting Started with Vue.js FREE CHAPTER 2. Scaffolding Projects With Vue CLI 3 3. Navigation with Vue Router 4. State Management with Vuex 5. Debugging With Vue DevTools 6. Server-Side Rendering with Nuxt.js 7. Static Site Generation with VuePress 8. Mobile App Development with NativeScript for Vue.js 9. Greater Control of JavaScript and Type Casting with TypeScript 10. The Future of Vue.js and Adoption Rates

Understanding the Virtual DOM

The DOM (Document Object Model) API is slow...very slow. Web applications have a lot of moving parts to them that require data to be updated instantly. Sometimes your application will react differently depending on the data that was modified. Since the DOM is really slow, your web application could be unusable if the user is updating a lot of data. To solve this problem, Vue.js uses something called a Virtual DOM.

Much like React, Vue.js utilizes a Virtual DOM that makes rendering your application’s user interface lightning fast. A Virtual DOM is a representation or a copy of the actual DOM; it’s also known as a “shadow DOM” and is rendered using JavaScript. In other words, when a change is made in the application, the Virtual DOM compares itself to the real DOM, defines what has changed, and only updates what needs to be changed.

Let’s say in a hypothetical app you have a header, a footer, and a content section. If a user updates some data in the content area of your application, only the content area will be re-rendered, not the header or the footer. Vue.js is smart and efficient enough to only re-render what’s needed, rather than the entire DOM.

You have been reading a chapter from
Vue.js: Understanding its Tools and Ecosystem
Published in: Nov 2019
Publisher:
ISBN-13: 9781800206625
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image