dillon1000/react
Commit
Browse files Allow forms to skip hydration of hidden inputs (#26735)
This allows us to emit extra ephemeral data that will only be used on server rendered forms. First I refactored the shouldSkip functions to now just do that work inside the canHydrate methods. This makes the Config bindings a little less surface area but it also helps us optimize a bit since we now can look at the code together and find shared paths. canHydrate returns the instance if it matches, that used to just be there to refine the type but it can also be used to just return a different instance later that we find. If we don't find one, we'll bail out and error regardless so no need to skip past anything.
Changed paths5 files
First-parent comparisonpackages/react-dom-bindings/src/client/ReactFiberConfigDOM.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/forks/ReactFiberConfig.custom.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…