dillon1000/react
Commit
Browse files unify deprecated/unsafe lifecycle warnings, pass tests (#16103)
- redoes #15431 from scratch, taking on the feedback there - unifies the messaging between "deprecated" and UNSAFE_ lifecycle messages. It reorganizes ReactStrictModeWarnings.js to capture and flush all the lifecycle warnings in one procedure each. - matches the warning from ReactPartialRenderer to match the above change - passes all the tests - this also turns on `warnAboutDeprecatedLifecycles` for the test renderer. I think we missed doing so it previously. In a future PR, I'll remove the feature flag altogether. - this DOES NOT do the same treatment for context warnings, I'll do that in another PR too
Changed paths16 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/__tests__/ReactServerRenderingHydration-test.js ModifiedM packages/react-dom/src/server/ReactPartialRenderer.js ModifiedM packages/react-reconciler/src/ReactFiberClassComponent.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-reconciler/src/ReactStrictModeWarnings.js ModifiedM packages/react-reconciler/src/__tests__/ReactIncremental-test.internal.js ModifiedM packages/react-reconciler/src/__tests__/ReactIncrementalPerf-test.internal.js ModifiedM packages/react-reconciler/src/__tests__/ReactIncrementalReflection-test.internal.js ModifiedM packages/react-reconciler/src/__tests__/ReactIncrementalUpdates-test.internal.js ModifiedM packages/react/src/__tests__/ReactStrictMode-test.internal.js ModifiedM packages/react/src/__tests__/createReactClassIntegration-test.internal.js ModifiedM packages/react/src/__tests__/createReactClassIntegration-test.js ModifiedM packages/shared/forks/ReactFeatureFlags.test-renderer.js ModifiedM scripts/print-warnings/print-warnings.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…