Improves the documentation on Reconciliation

This commit is contained in:
Rodrigo Rosenfeld Rosas
2017-10-09 21:08:05 -03:00
committed by GitHub
parent 8f50d04f92
commit b373eeccbd

View File

@@ -142,7 +142,7 @@ As a last resort, you can pass item's index in the array as a key. This can work
## Tradeoffs
It is important to remember that the reconciliation algorithm is an implementation detail. React could rerender the whole app on every action; the end result would be the same. We are regularly refining the heuristics in order to make common use cases faster.
It is important to remember that the reconciliation algorithm is an implementation detail. React could rerender the whole app on every action; the end result would be the same. Just to be clear, rerender in this context means calling `render` for all components, it doesn't mean React will unmount and remount them. It will only apply the differences following the rules stated in the previous sections. We are regularly refining the heuristics in order to make common use cases faster.
In the current implementation, you can express the fact that a subtree has been moved amongst its siblings, but you cannot tell that it has moved somewhere else. The algorithm will rerender that full subtree.