File tree Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import type {
1515
1616import { queueExplicitHydrationTarget } from '../events/ReactDOMEventReplaying' ;
1717import { REACT_ELEMENT_TYPE } from 'shared/ReactSymbols' ;
18+ import { enableFloat } from 'shared/ReactFeatureFlags' ;
1819
1920export type RootType = {
2021 render ( children : ReactNodeList ) : void ,
@@ -118,7 +119,7 @@ ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = functio
118119
119120 const container = root . containerInfo ;
120121
121- if ( container . nodeType !== COMMENT_NODE ) {
122+ if ( ! enableFloat && container . nodeType !== COMMENT_NODE ) {
122123 const hostInstance = findHostInstanceWithNoPortals ( root . current ) ;
123124 if ( hostInstance ) {
124125 if ( hostInstance . parentNode !== container ) {
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import {
2424 SuspenseComponent ,
2525} from './ReactWorkTags' ;
2626import { NoFlags , Placement , Hydrating } from './ReactFiberFlags' ;
27- import { supportsHydration , isHydratableResource } from './ReactFiberHostConfig' ;
2827
2928const ReactCurrentOwner = ReactSharedInternals . ReactCurrentOwner ;
3029
@@ -276,15 +275,7 @@ export function findCurrentHostFiber(parent: Fiber): Fiber | null {
276275function findCurrentHostFiberImpl ( node : Fiber ) {
277276 // Next we'll drill down this component to find the first HostComponent/Text.
278277 if ( node . tag === HostComponent || node . tag === HostText ) {
279- if (
280- enableFloat &&
281- supportsHydration &&
282- isHydratableResource ( node . type , node . memoizedProps )
283- ) {
284- // This is a crude opt out of Resources from this search algorithm
285- } else {
286- return node ;
287- }
278+ return node ;
288279 }
289280
290281 let child = node . child ;
@@ -309,15 +300,7 @@ export function findCurrentHostFiberWithNoPortals(parent: Fiber): Fiber | null {
309300function findCurrentHostFiberWithNoPortalsImpl ( node : Fiber ) {
310301 // Next we'll drill down this component to find the first HostComponent/Text.
311302 if ( node . tag === HostComponent || node . tag === HostText ) {
312- if (
313- enableFloat &&
314- supportsHydration &&
315- isHydratableResource ( node . type , node . memoizedProps )
316- ) {
317- // This is a crude opt out of Resources from this search algorithm
318- } else {
319- return node ;
320- }
303+ return node ;
321304 }
322305
323306 let child = node . child ;
You can’t perform that action at this time.
0 commit comments