Boris Dinkevich presents on React internals and optimizations. He discusses how React works under the hood to efficiently update the DOM by building a virtual DOM representation and only making necessary changes. This involves comparing the previous and current React trees to determine DOM mutations. Boris also covers the initial render process and component lifecycle methods in React.
17. Introducing BorisJS 2.0
1.Call render() to build tree
2.Read DOM into temp tree - “Current Tree"
3.Compare each element to temp tree
4.Change when needed
5.Win!
“temp tree”… sounds familiar
18. Pre cache
1. Call render() to build “Future Tree”
2. Compare each element to “Current Tree“
3. Change DOM when needed
4.Save “Future Tree” as “Current Tree”
5. Win!
What about first “Current Tree”?
19. Introducing BorisJS 3.0
Initial Render
1.Call render() to build tree
2.Save as “Current Tree”
3.Create initial DOM
Updates
1.Call render() to build “Future Tree”
2.Compare each element to “Current Tree”
4.Change DOM when needed
5.Save “Future Tree” as “Current Tree”
6.Win!
43. What does this mean?
<Header onClick={} />
<Header onPress={} />
44.
45. What is “React”?
addons 1,334
isomorphic 3,428
shared 7,058
renderers/
art 641
dom 12,337
native 2,735
noop 192
shared 9,368
* lines of code in 15-stable