From df615ce912058c224ba65c3cfdf9cb6efc8538a8 Mon Sep 17 00:00:00 2001 From: Manuel Penaloza Date: Wed, 20 Dec 2017 11:37:53 +0100 Subject: [PATCH] added small note regarding dom rendering added this as it might make the difference between renderers/render-packages and reconciliation (as a separate area of react development) more clear --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e272db3..fd82851 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ The central idea of React's API is to think of updates as if they cause the enti Actually re-rendering the entire app on each change only works for the most trivial apps; in a real-world app, it's prohibitively costly in terms of performance. React has optimizations which create the appearance of whole app re-rendering while maintaining great performance. The bulk of these optimizations are part of a process called **reconciliation**. -Reconciliation is the algorithm behind what is popularly understood as the "virtual DOM." A high-level description goes something like this: when you render a React application, a tree of nodes that describes the app is generated and saved in memory. This tree is then flushed to the rendering environment — for example, in the case of a browser application, it's translated to a set of DOM operations. When the app is updated (usually via `setState`), a new tree is generated. The new tree is diffed with the previous tree to compute which operations are needed to update the rendered app. +Reconciliation is the algorithm behind what is popularly understood as the "virtual DOM." A high-level description goes something like this: when you render a React application, a tree of nodes that describes the app is generated and saved in memory. This tree is then flushed to the rendering environment — for example, in the case of a browser application, it's translated to a set of DOM operations supported by [ReactDOM's](https://www.npmjs.com/package/react-dom) rendering mechanisms. When the app is updated (usually via `setState`), a new tree is generated. The new tree is diffed with the previous tree to compute which operations are needed to update the rendered app. Although Fiber is a ground-up rewrite of the reconciler, the high-level algorithm [described in the React docs](https://facebook.github.io/react/docs/reconciliation.html) will be largely the same. The key points are: