What the v...DOM?
summary
Walks through parsing and transforming JSX with Babel parse/transform/traverse/generator, builds a tiny virtual DOM factory that produces JS objects and a render/diff loop, and demonstrates a list that adds one item per second where initial naive render repaints everything (paint flashing) and a crude diff reduces work to a single inserted node. Claims a personal reimplementation of vDOM at 3.75 KB and 129 lines (not production), contrasts that with preact’s ~8 KB minified, and shows template-literal approaches (lit-html/hyperHTML) as an alternative.
AI-written summary · about
