What the v...DOM?
summary
Shows how JSX becomes an AST using Babel (Babylon) + traverse + generator, implements an H function that returns virtual nodes, wires components with a component.base and setState, and adds a simple diff that inserts only one list item instead of re-rendering 100. Mentions Preact, explains JSX pragma and hyperscript H, and reports the example app compiles to 3.75 KB, 129 lines while enabling selective re-rendering and render-queue optimizations.
AI-written summary · about
chapters (20)
- 0:00Start
- 2:34SOMETIMES IT FEELS LIKE MAGIC
- 2:50TAKE A BREAK!
- 3:40The imperative programming paradigm uses statements that change a program's state.
- 4:09The declarative programming paradigm expresses the logic of a computation without describing its control flow.
- 4:42INTERFACES
- 5:48CODE TRANSFORMS
- 7:03AST (Abstract Syntax Tree)
- 8:11VISITOR PATTERN (design pattern described by the "Gang of Four")
- 10:09BABEL PLUGIN
- 14:22NICELY DECLARATIVE
- 14:55A LOT OF WORK TO DO
- 17:30COMPONENT RENDERING
- 19:22renderComponent()
- 19:55COMPONENTS RENDER AUTONOMOUSLY
- 24:58BENEFITS
- 25:24LIMITED DOM OPERATIONS
- 26:20I READ A LOT OF PREACT CODE
- 26:39YOU'LL NEVER GET IT!
- 27:15THERE IS NO MAGIC IN CODE!








