4. ONLY CARES ABOUT THE UI
▫︎Routers
▫︎Models
▫︎Bindings
▫︎Observers
▫︎Templates
4
5. BINDINGS / OBSERVERS
▫︎Must mutate Model to propagate changes to View
▫︎Each mutation can trigger other observers (Run Loop /
Digest Loop)
▫︎Can't use immutable data structures as your model
▫︎Two-way bindings open Pandora’s box
▫︎No easy way of knowing how far-reaching a change in
the reverse direction is going to be
5
10. VIRTUAL DOM
10
▫︎in-memory data structure (fast)
▫︎JavaScript representation of DOM
nodes, totally separate from the
browser’s slow JavaScript/C++ DOM API
▫︎Makes server-side rendering possible
▫︎Most important…
12. 12
▫︎Build new Virtual DOM tree
▫︎Diff with old one
▫︎Compute minimal set of changes
▫︎Put them in a queue
▫︎Batch render all changes to browser
Treat the DOM like a GPU!
ON EVERY UPDATE
15. 15
▫︎React implements it's own event system
▫︎a cross-browser wrapper around the browser's
native event
▫︎same interface as the browser's native event
Treat the DOM like a GPU!
Synthetic Events