File tree 2 files changed +4
-20
lines changed 2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import type {
15
15
16
16
import { queueExplicitHydrationTarget } from '../events/ReactDOMEventReplaying' ;
17
17
import { REACT_ELEMENT_TYPE } from 'shared/ReactSymbols' ;
18
+ import { enableFloat } from 'shared/ReactFeatureFlags' ;
18
19
19
20
export type RootType = {
20
21
render ( children : ReactNodeList ) : void ,
@@ -118,7 +119,7 @@ ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = functio
118
119
119
120
const container = root . containerInfo ;
120
121
121
- if ( container . nodeType !== COMMENT_NODE ) {
122
+ if ( ! enableFloat && container . nodeType !== COMMENT_NODE ) {
122
123
const hostInstance = findHostInstanceWithNoPortals ( root . current ) ;
123
124
if ( hostInstance ) {
124
125
if ( hostInstance . parentNode !== container ) {
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import {
24
24
SuspenseComponent ,
25
25
} from './ReactWorkTags' ;
26
26
import { NoFlags , Placement , Hydrating } from './ReactFiberFlags' ;
27
- import { supportsHydration , isHydratableResource } from './ReactFiberHostConfig' ;
28
27
29
28
const ReactCurrentOwner = ReactSharedInternals . ReactCurrentOwner ;
30
29
@@ -276,15 +275,7 @@ export function findCurrentHostFiber(parent: Fiber): Fiber | null {
276
275
function findCurrentHostFiberImpl ( node : Fiber ) {
277
276
// Next we'll drill down this component to find the first HostComponent/Text.
278
277
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 ;
288
279
}
289
280
290
281
let child = node . child ;
@@ -309,15 +300,7 @@ export function findCurrentHostFiberWithNoPortals(parent: Fiber): Fiber | null {
309
300
function findCurrentHostFiberWithNoPortalsImpl ( node : Fiber ) {
310
301
// Next we'll drill down this component to find the first HostComponent/Text.
311
302
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 ;
321
304
}
322
305
323
306
let child = node . child ;
You can’t perform that action at this time.
0 commit comments