dillon1000/react

Commit

Fixed descrepancy between host and class component refs (#12178)

When a ref is removed from a class component, React now calls the previous ref-setter (if there was one) with null. Previously this was the case only for host component refs.

A new test has been added.
Browse files
Changed paths2 files
First-parent comparison
M packages/react-dom/src/__tests__/refs-destruction-test.js ModifiedM packages/react-reconciler/src/ReactFiberBeginWork.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…