dillon1000/react
Commit
Browse files Replace `mountDepth` with `isTopLevel`
Summary: After #2570, `mountDepth` is only used to enforce that `setProps` and `replaceProps` is only invoked on the top-level component. This replaces `mountDepth` with a simpler `isTopLevel` boolean set by `ReactMount` which reduces the surface area of the internal API and removes the need to thread `mountDepth` throughout React core. Reviewers: @sebmarkbage @zpao Test Plan: Ran unit tests successfully: ``` npm run jest ```
Changed paths12 files
First-parent comparisonsrc/browser/server/ReactServerRendering.js ModifiedM src/browser/ui/ReactDOMComponent.js ModifiedM src/browser/ui/ReactDOMTextComponent.js ModifiedM src/browser/ui/ReactMount.js ModifiedM src/browser/ui/__tests__/ReactDOMComponent-test.js ModifiedM src/browser/ui/dom/__tests__/Danger-test.js ModifiedM src/core/ReactComponent.js ModifiedM src/core/ReactCompositeComponent.js ModifiedM src/core/ReactMultiChild.js ModifiedM src/core/__tests__/ReactComponent-test.js ModifiedM src/core/__tests__/ReactCompositeComponent-test.js ModifiedM src/test/ReactTestUtils.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…