File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
react-dom-bindings/src/client Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ import {
8989 enableHostSingletons ,
9090 enableTrustedTypesIntegration ,
9191 diffInCommitPhase ,
92+ enableFormActions ,
9293} from 'shared/ReactFeatureFlags' ;
9394import {
9495 HostComponent ,
@@ -1419,12 +1420,14 @@ export function commitHydratedSuspenseInstance(
14191420 retryIfBlockedOn ( suspenseInstance ) ;
14201421}
14211422
1422- // @TODO remove this function once float lands and hydrated tail nodes
1423- // are controlled by HostSingleton fibers
14241423export function shouldDeleteUnhydratedTailInstances (
14251424 parentType : string ,
14261425) : boolean {
1427- return parentType !== 'head' && parentType !== 'body' ;
1426+ return (
1427+ ( enableHostSingletons ||
1428+ ( parentType !== 'head' && parentType !== 'body' ) ) &&
1429+ ( ! enableFormActions || parentType !== 'form' )
1430+ ) ;
14281431}
14291432
14301433export function didNotMatchHydratedContainerTextInstance (
Original file line number Diff line number Diff line change @@ -802,7 +802,8 @@ function popHydrationState(fiber: Fiber): boolean {
802802 fiber . tag !== HostSingleton &&
803803 ! (
804804 fiber . tag === HostComponent &&
805- shouldSetTextContent ( fiber . type , fiber . memoizedProps )
805+ ( ! shouldDeleteUnhydratedTailInstances ( fiber . type ) ||
806+ shouldSetTextContent ( fiber . type , fiber . memoizedProps ) )
806807 )
807808 ) {
808809 shouldClear = true ;
You can’t perform that action at this time.
0 commit comments