dillon1000/react

Commit

Add warning to prevent setting this.state to this.props referentially (#11658)

* add test to warn if setting this.state to this.props referentially

* Avoid an extra check
Browse files
Changed paths2 files
First-parent comparison
M packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js ModifiedM packages/react-reconciler/src/ReactFiberClassComponent.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…