dillon1000/react
Commit
Browse files Invoke both legacy and UNSAFE_ lifecycles when both are present (#12134)
* Invoke both legacy and UNSAFE_ lifecycles when both are present This is to support edge cases with eg create-react-class where a mixin defines a legacy lifecycle but the component being created defines an UNSAFE one (or vice versa). I did not warn about this case because the warning would be a bit redundant with the deprecation warning which we will soon be enabling. I could be convinced to change my stance here though. * Added explicit function-type check to SS ReactPartialRenderer
Changed paths7 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMServerLifecycles-test.js ModifiedM packages/react-dom/src/server/ReactPartialRenderer.js ModifiedM packages/react-reconciler/src/ReactFiberClassComponent.js ModifiedM packages/react-test-renderer/src/ReactShallowRenderer.js ModifiedM packages/react-test-renderer/src/__tests__/ReactShallowRenderer-test.js ModifiedM packages/react/src/__tests__/createReactClassIntegration-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…