dillon1000/react
Commit
Browse files Move Hydration Warnings from the DOM Config into the Fiber reconciliation (#28476)
Stacked on #28458. This doesn't actually really change the messages yet, it's just a refactor. Hydration warnings can be presented either as HTML or React JSX format. If presented as HTML it makes more sense to make that a DOM specific concept, however, I think it's actually better to present it in terms of React JSX. Most of the time the errors aren't going to be something messing with them at the HTML/HTTP layer. It's because the JS code does something different. Most of the time you're working in just React. People don't necessarily even know what the HTML form of it looks like. So this takes the approach that the warnings are presented in React JSX in their rich object form. Therefore, I'm moving the approach to yield diff data to the reconciler but it's the reconciler that's actually printing all the warnings.
Changed paths17 files
First-parent comparisonpackages/react-dom-bindings/src/client/ReactDOMComponent.js ModifiedM packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js ModifiedM packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMFizzSuppressHydrationWarning-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMFloat-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMOption-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMRoot-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js ModifiedM packages/react-dom/src/__tests__/ReactDOMSingletonComponents-test.js ModifiedM packages/react-dom/src/__tests__/ReactRenderDocument-test.js ModifiedM packages/react-dom/src/__tests__/ReactServerRenderingHydration-test.js ModifiedM packages/react-reconciler/src/ReactFiberConfigWithNoHydration.js ModifiedM packages/react-reconciler/src/ReactFiberHydrationContext.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-reconciler/src/forks/ReactFiberConfig.custom.js ModifiedM scripts/jest/shouldIgnoreConsoleError.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…