From de78fbfadee779ff199bdd9a436659039f50b63b Mon Sep 17 00:00:00 2001 From: sebmarkbage Date: Thu, 4 May 2023 14:22:04 -0700 Subject: [PATCH] Allow forms to skip hydration of hidden inputs (#26735) Summary: 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. DiffTrain build for commit https://github.com/facebook/react/commit/67f4fb02130b1fe1856289e3b66bb0b8cca57ff7. Changelog: [Internal] << DO NOT EDIT BELOW THIS LINE >> Reviewed By: sammy-SC Differential Revision: D45453502 Pulled By: tyao1 fbshipit-source-id: 1ac34bcc2d59fdbfbc25e51f6bd5354777a33f96 --- packages/react-native/Libraries/Renderer/REVISION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/Renderer/REVISION b/packages/react-native/Libraries/Renderer/REVISION index d0972ff0c5376a..7dbbadbbae55d8 100644 --- a/packages/react-native/Libraries/Renderer/REVISION +++ b/packages/react-native/Libraries/Renderer/REVISION @@ -1 +1 @@ -8ea96ef84d8f08ed1846dec9e8ed20d2225db0d3 +67f4fb02130b1fe1856289e3b66bb0b8cca57ff7