dillon1000/react

Commit

Summary: Currently, `ReactUpdates` updates dirty components in increasing order of mount depth. However, mount depth is only relative to the component passed into `React.render`. This breaks down for components that invoke `React.render` as an implementation detail because the child components will be updated before the parent component.

This fixes the problem by using the order in which components are mounted (instead of their depth). The mount order transcends component trees (rooted at `React.render` calls).

Reviewers: @sebmarkbage @zpao

Test Plan:
Ran unit tests successfully:

```
npm run jest
```
Browse files
Changed paths3 files
First-parent comparison
M src/core/ReactCompositeComponent.js ModifiedM src/core/ReactUpdates.js ModifiedM src/core/__tests__/ReactUpdates-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…