Tagged articles
5 articles
Page 1 of 1
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 14, 2023 · Frontend Development

Understanding Vue's Diff Algorithm: A Step‑by‑Step Guide

This article explains Vue's diff algorithm in detail, covering prerequisite concepts about VNode, left‑ and right‑side comparisons, handling arrays of different lengths, and the complete implementation with code examples to help developers grasp how Vue efficiently updates the DOM.

Diff AlgorithmJavaScriptVue
0 likes · 11 min read
Understanding Vue's Diff Algorithm: A Step‑by‑Step Guide
Sohu Tech Products
Sohu Tech Products
Dec 15, 2021 · Frontend Development

Implementing a Simple Virtual DOM Library with Patch and Diff Algorithms

This article explains how to build a lightweight virtual DOM library in JavaScript, covering the creation of VNode objects, the patch and diff algorithms, handling of attributes, classes, styles, and events, and demonstrates a step‑by‑step implementation using the Snabbdom approach.

Diff AlgorithmJavaScriptSnabbdom
0 likes · 18 min read
Implementing a Simple Virtual DOM Library with Patch and Diff Algorithms