Skip to content

Commit b301095

Browse files
committed
Remove createRootStrictEffectsByDefault flag
1 parent c7e735f commit b301095

12 files changed

+249
-118
lines changed

packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -776,14 +776,7 @@ describe('ReactDOMServerPartialHydration', () => {
776776
const span2 = container.getElementsByTagName('span')[0];
777777
// This is a new node.
778778
expect(span).not.toBe(span2);
779-
780-
if (gate(flags => flags.dfsEffectsRefactor)) {
781-
// The effects list refactor causes this to be null because the Suspense Activity's child
782-
// is null. However, since we can't hydrate Suspense in legacy this change in behavior is ok
783-
expect(ref.current).toBe(null);
784-
} else {
785-
expect(ref.current).toBe(span2);
786-
}
779+
expect(ref.current).toBe(span2);
787780

788781
// Resolving the promise should render the final content.
789782
suspend = false;

packages/react-reconciler/src/ReactFiber.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
isHostSingletonType,
2929
} from './ReactFiberConfig';
3030
import {
31-
createRootStrictEffectsByDefault,
3231
enableCache,
3332
enableProfilerTimer,
3433
enableScopeAPI,
@@ -456,7 +455,7 @@ export function createHostRootFiber(
456455
let mode;
457456
if (tag === ConcurrentRoot) {
458457
mode = ConcurrentMode;
459-
if (isStrictMode === true || createRootStrictEffectsByDefault) {
458+
if (isStrictMode === true) {
460459
mode |= StrictLegacyMode | StrictEffectsMode;
461460
}
462461
if (

0 commit comments

Comments
 (0)