dillon1000/react

Commit

Revert #4993 with an added test for refs

We were shallow-rendering a component that used refs at FB so this can't go in as-is. It's a little unclear what we _should_ do though, since there is nothing to hold a ref to (since we're shallowly rendering) and we generally promise that child refs are resolved before a parent's componentDidMount. Also, changing shallow rendering to use the original `_renderValidatedComponent` (instead of `_renderValidatedComponentWithoutOwnerOrContext`) breaks tests because now the `_owner` field doesn't match up for `toEqual` (non-null in `getRenderOutput` but null if constructed in a test).
Browse files
Changed paths2 files
First-parent comparison
M src/test/ReactTestUtils.js ModifiedM src/test/__tests__/ReactTestUtils-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…