@@ -87,7 +87,11 @@ let isHydrating: boolean = false;
8787
8888// this flag allows for warning supression when we expect there to be mismatches due to
8989// earlier mismatches or a suspended fiber.
90+ < << << << packages / react-reconciler / src / ReactFiberHydrationContext . old . js
9091let didSuspendOrError : boolean = false ;
92+ === === =
93+ let didSuspendOrErrorDEV : boolean = false ;
94+ >>> >>> > packages/react-reconciler/src/ReactFiberHydrationContext.new.js
9195
9296// Hydration errors that were thrown inside this boundary
9397let hydrationErrors: Array< mixed > | null = null;
@@ -104,7 +108,11 @@ function warnIfHydrating() {
104108
105109export function markDidThrowWhileHydratingDEV() {
106110 if ( __DEV__ ) {
111+ << < << << packages / react - reconciler / src / ReactFiberHydrationContext . old . js
107112 didSuspendOrError = true ;
113+ === = ===
114+ didSuspendOrErrorDEV = true ;
115+ >>> > >>> packages / react - reconciler / src / ReactFiberHydrationContext . new . js
108116 }
109117}
110118
@@ -120,7 +128,11 @@ function enterHydrationState(fiber: Fiber): boolean {
120128 hydrationParentFiber = fiber;
121129 isHydrating = true;
122130 hydrationErrors = null;
131+ < << << << packages / react-reconciler / src / ReactFiberHydrationContext . old . js
123132 didSuspendOrError = false ;
133+ === === =
134+ didSuspendOrErrorDEV = false ;
135+ >>> >>> > packages/react-reconciler/src/ReactFiberHydrationContext.new.js
124136 return true;
125137}
126138
@@ -138,7 +150,11 @@ function reenterHydrationStateFromDehydratedSuspenseInstance(
138150 hydrationParentFiber = fiber;
139151 isHydrating = true;
140152 hydrationErrors = null;
153+ < << << << packages / react-reconciler / src / ReactFiberHydrationContext . old . js
141154 didSuspendOrError = false ;
155+ === === =
156+ didSuspendOrErrorDEV = false ;
157+ >>> >>> > packages/react-reconciler/src/ReactFiberHydrationContext.new.js
142158 if (treeContext !== null) {
143159 restoreSuspendedTreeContext ( fiber , treeContext ) ;
144160 }
@@ -203,7 +219,11 @@ function deleteHydratableInstance(
203219
204220function warnNonhydratedInstance ( returnFiber : Fiber , fiber : Fiber ) {
205221 if ( __DEV__ ) {
222+ << < << << packages / react - reconciler / src / ReactFiberHydrationContext . old . js
206223 if ( didSuspendOrError ) {
224+ === = ===
225+ if ( didSuspendOrErrorDEV ) {
226+ >>> > >>> packages / react - reconciler / src / ReactFiberHydrationContext . new . js
207227 // Inside a boundary that already suspended. We're currently rendering the
208228 // siblings of a suspended node. The mismatch may be due to the missing
209229 // data, so it's probably a false positive.
@@ -454,7 +474,11 @@ function prepareToHydrateHostInstance(
454474 }
455475
456476 const instance: Instance = fiber.stateNode;
477+ < << << << packages / react-reconciler / src / ReactFiberHydrationContext . old . js
457478 const shouldWarnIfMismatchDev = ! didSuspendOrError ;
479+ === === =
480+ const shouldWarnIfMismatchDev = ! didSuspendOrErrorDEV ;
481+ >>> >>> > packages/react-reconciler/src/ReactFiberHydrationContext.new.js
458482 const updatePayload = hydrateInstance(
459483 instance,
460484 fiber.type,
@@ -484,7 +508,11 @@ function prepareToHydrateHostTextInstance(fiber: Fiber): boolean {
484508
485509 const textInstance: TextInstance = fiber.stateNode;
486510 const textContent: string = fiber.memoizedProps;
511+ < << << << packages / react-reconciler / src / ReactFiberHydrationContext . old . js
487512 const shouldWarnIfMismatchDev = ! didSuspendOrError ;
513+ === === =
514+ const shouldWarnIfMismatchDev = ! didSuspendOrErrorDEV ;
515+ >>> >>> > packages/react-reconciler/src/ReactFiberHydrationContext.new.js
488516 const shouldUpdate = hydrateTextInstance(
489517 textInstance,
490518 textContent,
@@ -663,7 +691,11 @@ function resetHydrationState(): void {
663691 hydrationParentFiber = null;
664692 nextHydratableInstance = null;
665693 isHydrating = false;
694+ < << << << packages / react-reconciler / src / ReactFiberHydrationContext . old . js
666695 didSuspendOrError = false ;
696+ === === =
697+ didSuspendOrErrorDEV = false ;
698+ >>> >>> > packages/react-reconciler/src/ReactFiberHydrationContext.new.js
667699}
668700
669701export function upgradeHydrationErrorsToRecoverable ( ) : void {
0 commit comments