@samitouri / QOS-React-2 / commits / 61349eb5a6

Add additional field for ART reconciler

ART, just like MultiChild adds an expando property to manage it's diffing state. This is ugly and bad. We should be moving this state outside the component for use by the diffing algorithm. This state is not needed by components nested in composites, and varies by diffing algorithm. It sucks that I have to add it to every component just to support ART, but that's the quickest solution, other than disabling preventExtensions. At least now we know that it sucks.

Sebastian Markbage committed Nov 24, 2014 at 17:02 UTC 61349eb5a6cd23f49b330500aba17077f134d354
1 file changed +4
src/core/ReactComponent.js
+4
@@ -89,7 +89,11 @@ var ReactComponent = {
89 // We keep the old element and a reference to the pending element
90 // to track updates.
91 this._currentElement = element;
92 + // These two fields are used by the DOM and ART diffing algorithms
93 + // respectively. Instead of using expandos on components, we should be
94 + // storing the state needed by the diffing algorithms elsewhere.
95 this._mountIndex = 0;
96 + this._mountImage = null;
97 },
98
99 /**