dillon1000/react
Commit
Browse files Don’t error when returning an empty Fragment (#12966)
* Don’t error when returning an empty Fragment When a fragment is reconciled, we directly move onto it’s children. Since an empty `<React.Fragment/>` will have children of `undefined`, this would always throw. To fix this, we bail out in those cases. * Test the update path as well * Reuse existing code path * An even more explicit solution that also fixes Flow
Changed paths2 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMFiber-test.js ModifiedM packages/react-reconciler/src/ReactChildFiber.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…