Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unset mComponentScope in the root ComponentContext.
Summary: When a `ComponentTree` is initialized with a `ComponentContext` from another Component (from another tree) the global key of the root component is generated in context of a component which is outside the tree. This is generally `null`. In such a case when a state update is dispatched, and the framework tries to generate the global key for the root component. The root component (which has a non null parent in this case) will ask its parent to generate a global key. Now the **falsy** parent components child counters haven’t been reset so it will check that this is a new instance of the same component and deduplicate the global key (i.e. append !n). This changes the global keys for all descendants components. In some cases it can trigger a new state update and the cycle repeat over and over again. Reviewed By: davidaurelio Differential Revision: D15363542 fbshipit-source-id: bea8923e7087dbdedb430b3c1af5a47e688e4193
- Loading branch information