From ad8cb6ea709aae9a7f551f79c185ef12f9342a02 Mon Sep 17 00:00:00 2001 From: Rodrigo Rosenfeld Rosas Date: Tue, 10 Oct 2017 12:36:29 -0300 Subject: [PATCH] Improve writing style in Reconciliation Tradeoffs (#119) I've improved my previous changes to what re-render means by following Dan Abramov's suggestion on the writing style to remove the parenthesis from that paragraph. See issue #108 for more context. --- content/docs/reconciliation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/reconciliation.md b/content/docs/reconciliation.md index 7b36664a..6a23282c 100644 --- a/content/docs/reconciliation.md +++ b/content/docs/reconciliation.md @@ -142,9 +142,9 @@ 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. (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. +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. -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. +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. Because React relies on heuristics, if the assumptions behind them are not met, performance will suffer.