Skip to Content
실전 코드로 배우는 Vue.js
book

실전 코드로 배우는 Vue.js

by 마야 셰빈, 정병열
October 2024
Beginner to intermediate
452 pages
9h 28m
Korean
Hanbit Media, Inc.
Content preview from 실전 코드로 배우는 Vue.js
38
실전 코드로 배우는 Vue.js
2.1.3
Vue
에서 가상
DOM
이 작동하는 방식
가상
DOM
은 실제
DOM
Vue
애플리케이션 코드 사이에 자리 잡고 있다. 다음은 가상
DOM
에서 노드를 표현하는 예시다.
const node = {
tag: 'div',
attributes: [{ id: 'list-container', class: 'list-container' }],
children: [ /* 노드들의 배열 */]
}
이 노드를
VNode
라 부르자.
VNode
는 가상
DOM
속에 존재하며, 실제
DOM
에 존재하는
엘리먼트를 가리키는
가상 노드
virtual
node
다.
UI
상호작용을 통해 사용자는 엘리먼트의 변화 상태를
Vue
에 알린다.
Vue
는 가상
DOM
조작해 해당 엘리먼트의 표현 객체(
node
)를 원하는 모양으로 업데이트하며, 동시에 이러한
변경 사항을 추적한다. 마지막으로
Vue
는 실제
DOM
과 통신하며 변경된 노드에 따라
DOM
을 정확하게 업데이트한다.
가상
DOM
은 자바스크립트 객체 트리의 일종이므로 컴포넌트 업데이트는 일반적인 자바스
크립트 객체 업데이트와 같다. 이. 과정은 그리 오래 걸리지 않는다. 또한
DOM
API
를 호출
하지 않기 때문에 이러한 업데이트 작업은
DOM
리페인팅
repainting
을 유발하지 않는다.
가상
DOM
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

실전 자바 소프트웨어 개발: 4가지 프로젝트로 배우는 최신 자바 개발 기법

실전 자바 소프트웨어 개발: 4가지 프로젝트로 배우는 최신 자바 개발 기법

우정은, 라울-게이브리얼 우르마, 리처드 워버턴
자바스크립트 + 리액트 디자인 패턴

자바스크립트 + 리액트 디자인 패턴

애디 오스마니(Addy Osmani)
실무로 통하는 타입스크립트

실무로 통하는 타입스크립트

슈테판 바움가르트너

Publisher Resources

ISBN: 9791169212991