mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix small typo in 11-advanced-performance.md.
"React didn't even had"->"React didn't even have"
http://english.stackexchange.com/questions/204603/proper-usage-of-didnt-had-or-didnt-have
(cherry picked from commit 4fe1b59849)
This commit is contained in:
committed by
Ben Alpert
parent
d77f417767
commit
3b5ff0aea7
@@ -38,7 +38,7 @@ Here's a subtree of components. For each one is indicated what `shouldComponentU
|
||||
|
||||
<figure><img src="/react/img/docs/should-component-update.png" /></figure>
|
||||
|
||||
In the example above, since `shouldComponentUpdate` returned `false` for the subtree rooted at C2, React had no need to generate the new virtual DOM, and therefore, it neither needed to reconcile the DOM. Note that React didn't even had to invoke `shouldComponentUpdate` on C4 and C5.
|
||||
In the example above, since `shouldComponentUpdate` returned `false` for the subtree rooted at C2, React had no need to generate the new virtual DOM, and therefore, it neither needed to reconcile the DOM. Note that React didn't even have to invoke `shouldComponentUpdate` on C4 and C5.
|
||||
|
||||
For C1 and C3 `shouldComponentUpdate` returned `true`, so React had to go down to the leaves and check them. For C6 it returned `true`; since the virtual DOMs weren't equivalent it had to reconcile the DOM.
|
||||
The last interesting case is C8. For this node React had to compute the virtual DOM, but since it was equal to the old one, it didn't have to reconcile it's DOM.
|
||||
|
||||
Reference in New Issue
Block a user