dillon1000/react

Commit

Shares debugID information across modules (#8097)

Prior to this, React was using a nextDebugID variable that was locally
scoped to both `instantiateReactComponent` and `ReactShallowRenderer`.
This caused problems when the debugIDs would collide, the `itemMap` in
`ReactComponentTreeHook` would be overwritten and tests would fail
with the message "Expected onBeforeMountComponent() parent and
onSetChildren() to be consistent".

This change shares the debugID with both modules thus preventing any
collisions in the future.
Browse files
Changed paths3 files
First-parent comparison
M src/renderers/shared/stack/reconciler/instantiateReactComponent.js ModifiedA src/shared/utils/getNextDebugID.js AddedM src/test/ReactShallowRenderer.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…