Tagged articles
key
11 articles · Page 1 of 1
This article explores how React's key prop works internally, tracing its path from JSX to ReactElement and Fiber, and detailing the three-phase reconciliation algorithm that matches old and new nodes during list updates, with source code examples from React v19.2.8.
FiberReactReactElement
0 likes · 24 min read

This guide explains MySQL partitioning fundamentals, shows how to create RANGE, LIST, and KEY partitions with concrete CREATE TABLE examples, compares the performance benefits and maintenance trade‑offs, and clarifies the differences between partitioning and sharding to help you decide when to use each technique.
ListMySQLPartitioning
0 likes · 7 min read

This article walks through reproducing a memory‑leak scenario in a Vue2‑based terminal application, analyzes common leak causes, demonstrates how adding dynamic keys and patching Vue's sameVnode function resolves the issue, and shows how to ship the fix with patch‑package for production deployments.
Memory LeakVuedebugging
0 likes · 9 min read

This article explains why a scrollable table component misbehaves when its height changes, analyzes the root cause in the internal scroll wrapper, and demonstrates practical ways to force a Vue component to re‑render using v‑if, dynamic keys, and zero‑delay timers, complete with code examples.
@ComponentForce Updatekey
0 likes · 7 min read

This comprehensive guide explains what React re‑renders are, distinguishes necessary from unnecessary re‑renders, outlines the four triggers—state, parent re‑render, context, and hooks—and provides practical patterns and anti‑patterns, including memoization, useMemo/useCallback, and key management, to improve component performance.
ContextReactkey
0 likes · 15 min read

This article explains the concept of virtual DOM, its advantages over direct DOM manipulation, details the diff algorithm including same‑layer comparison, pointer techniques, and longest increasing subsequence optimizations in Vue2 and Vue3, and discusses key usage and performance considerations.
Diff AlgorithmVirtual DOMVue
0 likes · 23 min read


政采云技术Nov 2, 2021 · Frontend Development
Using an array index as the key in Vue list rendering can cause unnecessary DOM re‑creation, performance degradation, and data misalignment, especially when items are inserted, removed, or reordered, so developers should prefer stable, unique identifiers such as IDs, symbols, or UUIDs for keys.
Diff Algorithmfrontendkey
0 likes · 17 min read

This article explains the concept of virtual DOM, its structure, and how Vue's diff (patch) algorithm works, including detailed code walkthroughs, optimization strategies, key usage, and differences between Vue2 and Vue3 implementations, helping readers fully grasp the underlying principles and performance improvements.
Diff AlgorithmVirtual DOMVue.js
0 likes · 28 min read

This article explains why using a numeric index as the key in a Vue.js v‑for loop can cause transition animations to apply only to the last element, and shows how switching the key to a unique string restores smooth, sequential animations.
TransitionVue.jskey
0 likes · 4 min read

This article explains the purpose of the key attribute in Vue, demonstrates why using the array index or random numbers as keys breaks the virtual‑DOM diff algorithm, and provides best‑practice recommendations for stable, unique keys to ensure efficient component updates.
Diff AlgorithmVue.jsfrontend performance
0 likes · 12 min read

This article explains the purpose of the React "key" prop, shows how missing keys cause warnings and rendering bugs, demonstrates proper usage with code examples, and discusses how keys affect component updates, lifecycle handling, and performance in complex UI scenarios.
JSXReactcomponent lifecycle
0 likes · 11 min read
