@@ -18,7 +18,6 @@ import {
18
18
MountLayoutDev ,
19
19
} from './ReactFiberFlags' ;
20
20
import {
21
- debugRenderPhaseSideEffectsForStrictMode ,
22
21
disableLegacyContext ,
23
22
enableSchedulingProfiler ,
24
23
disableDefaultPropsExceptForClasses ,
@@ -138,10 +137,7 @@ function applyDerivedStateFromProps(
138
137
const prevState = workInProgress . memoizedState ;
139
138
let partialState = getDerivedStateFromProps ( nextProps , prevState ) ;
140
139
if ( __DEV__ ) {
141
- if (
142
- debugRenderPhaseSideEffectsForStrictMode &&
143
- workInProgress . mode & StrictLegacyMode
144
- ) {
140
+ if ( workInProgress . mode & StrictLegacyMode ) {
145
141
setIsStrictModeForDevtools ( true ) ;
146
142
try {
147
143
// Invoke the function an extra time to help detect side-effects.
@@ -266,10 +262,7 @@ function checkShouldComponentUpdate(
266
262
nextContext ,
267
263
) ;
268
264
if ( __DEV__ ) {
269
- if (
270
- debugRenderPhaseSideEffectsForStrictMode &&
271
- workInProgress . mode & StrictLegacyMode
272
- ) {
265
+ if ( workInProgress . mode & StrictLegacyMode ) {
273
266
setIsStrictModeForDevtools ( true ) ;
274
267
try {
275
268
// Invoke the function an extra time to help detect side-effects.
@@ -598,10 +591,7 @@ function constructClassInstance(
598
591
let instance = new ctor ( props , context ) ;
599
592
// Instantiate twice to help detect side-effects.
600
593
if ( __DEV__ ) {
601
- if (
602
- debugRenderPhaseSideEffectsForStrictMode &&
603
- workInProgress . mode & StrictLegacyMode
604
- ) {
594
+ if ( workInProgress . mode & StrictLegacyMode ) {
605
595
setIsStrictModeForDevtools ( true ) ;
606
596
try {
607
597
instance = new ctor ( props , context ) ;
0 commit comments