@samitouri / QOS-React-2 / commits / fc40f02adb

Add consoleManagedByDevToolsDuringStrictMode feature flag in React Reconciler (#22196)

Luna Ruan committed Sep 1, 2021 at 11:56 UTC fc40f02adb2d11e4936cc31119c7a45acc471a7a
13 files changed +418 -172
packages/react-reconciler/src/ReactFiberReconciler.new.js
+21 -8
@@ -35,7 +35,10 @@ import {
35 import getComponentNameFromFiber from 'react-reconciler/src/getComponentNameFromFiber';
36 import invariant from 'shared/invariant';
37 import isArray from 'shared/isArray';
38 -import {enableSchedulingProfiler} from 'shared/ReactFeatureFlags';
38 +import {
39 + enableSchedulingProfiler,
40 + consoleManagedByDevToolsDuringStrictMode,
41 +} from 'shared/ReactFeatureFlags';
42 import ReactSharedInternals from 'shared/ReactSharedInternals';
43 import {getPublicInstance} from './ReactFiberHostConfig';
44 import {
@@ -107,6 +110,7 @@ export {
110
111 import * as Scheduler from './Scheduler';
112 import {setSuppressWarning} from 'shared/consoleWithStackDev';
113 +import {disableLogs, reenableLogs} from 'shared/ConsolePatchingDev';
114
115 type OpaqueRoot = FiberRoot;
116
@@ -717,14 +721,23 @@ export function getIsStrictModeForDevtools() {
721 }
722
723 export function setIsStrictModeForDevtools(newIsStrictMode: boolean) {
720 - // We're in a test because Scheduler.unstable_yieldValue only exists
721 - // in SchedulerMock. To reduce the noise in strict mode tests,
722 - // suppress warnings and disable scheduler yielding during the double render
723 - if (typeof Scheduler.unstable_yieldValue === 'function') {
724 - Scheduler.unstable_setDisableYieldValue(newIsStrictMode);
725 - setSuppressWarning(newIsStrictMode);
726 - }
724 isStrictMode = newIsStrictMode;
725 +
726 + if (consoleManagedByDevToolsDuringStrictMode) {
727 + // We're in a test because Scheduler.unstable_yieldValue only exists
728 + // in SchedulerMock. To reduce the noise in strict mode tests,
729 + // suppress warnings and disable scheduler yielding during the double render
730 + if (typeof Scheduler.unstable_yieldValue === 'function') {
731 + Scheduler.unstable_setDisableYieldValue(newIsStrictMode);
732 + setSuppressWarning(newIsStrictMode);
733 + }
734 + } else {
735 + if (newIsStrictMode) {
736 + disableLogs();
737 + } else {
738 + reenableLogs();
739 + }
740 + }
741 }
742
743 export function injectIntoDevTools(devToolsConfig: DevToolsConfig): boolean {
packages/react-reconciler/src/ReactFiberReconciler.old.js
+21 -8
@@ -35,7 +35,10 @@ import {
35 import getComponentNameFromFiber from 'react-reconciler/src/getComponentNameFromFiber';
36 import invariant from 'shared/invariant';
37 import isArray from 'shared/isArray';
38 -import {enableSchedulingProfiler} from 'shared/ReactFeatureFlags';
38 +import {
39 + enableSchedulingProfiler,
40 + consoleManagedByDevToolsDuringStrictMode,
41 +} from 'shared/ReactFeatureFlags';
42 import ReactSharedInternals from 'shared/ReactSharedInternals';
43 import {getPublicInstance} from './ReactFiberHostConfig';
44 import {
@@ -107,6 +110,7 @@ export {
110
111 import * as Scheduler from './Scheduler';
112 import {setSuppressWarning} from 'shared/consoleWithStackDev';
113 +import {disableLogs, reenableLogs} from 'shared/ConsolePatchingDev';
114
115 type OpaqueRoot = FiberRoot;
116
@@ -717,14 +721,23 @@ export function getIsStrictModeForDevtools() {
721 }
722
723 export function setIsStrictModeForDevtools(newIsStrictMode: boolean) {
720 - // We're in a test because Scheduler.unstable_yieldValue only exists
721 - // in SchedulerMock. To reduce the noise in strict mode tests,
722 - // suppress warnings and disable scheduler yielding during the double render
723 - if (typeof Scheduler.unstable_yieldValue === 'function') {
724 - Scheduler.unstable_setDisableYieldValue(newIsStrictMode);
725 - setSuppressWarning(newIsStrictMode);
726 - }
724 isStrictMode = newIsStrictMode;
725 +
726 + if (consoleManagedByDevToolsDuringStrictMode) {
727 + // We're in a test because Scheduler.unstable_yieldValue only exists
728 + // in SchedulerMock. To reduce the noise in strict mode tests,
729 + // suppress warnings and disable scheduler yielding during the double render
730 + if (typeof Scheduler.unstable_yieldValue === 'function') {
731 + Scheduler.unstable_setDisableYieldValue(newIsStrictMode);
732 + setSuppressWarning(newIsStrictMode);
733 + }
734 + } else {
735 + if (newIsStrictMode) {
736 + disableLogs();
737 + } else {
738 + reenableLogs();
739 + }
740 + }
741 }
742
743 export function injectIntoDevTools(devToolsConfig: DevToolsConfig): boolean {
packages/react/src/__tests__/ReactStrictMode-test.js
+356 -156
@@ -15,6 +15,8 @@ let ReactDOMServer;
15 let Scheduler;
16 let PropTypes;
17
18 +const ReactFeatureFlags = require('shared/ReactFeatureFlags');
19 +
20 describe('ReactStrictMode', () => {
21 beforeEach(() => {
22 jest.resetModules();
@@ -893,195 +895,393 @@ describe('context legacy', () => {
895 ReactDOM.render(<Root />, container);
896 });
897
896 - describe('logging', () => {
897 - it('does not disable logs for class double render', () => {
898 - spyOnDevAndProd(console, 'log');
898 + describe('console logs logging', () => {
899 + beforeEach(() => {
900 + jest.resetModules();
901 + React = require('react');
902 + ReactDOM = require('react-dom');
903 + });
904
900 - let count = 0;
901 - class Foo extends React.Component {
902 - render() {
903 - count++;
904 - console.log('foo ' + count);
905 - return null;
905 + if (ReactFeatureFlags.consoleManagedByDevToolsDuringStrictMode) {
906 + it('does not disable logs for class double render', () => {
907 + spyOnDevAndProd(console, 'log');
908 +
909 + let count = 0;
910 + class Foo extends React.Component {
911 + render() {
912 + count++;
913 + console.log('foo ' + count);
914 + return null;
915 + }
916 }
907 - }
917
909 - const container = document.createElement('div');
910 - ReactDOM.render(
911 - <React.StrictMode>
912 - <Foo />
913 - </React.StrictMode>,
914 - container,
915 - );
918 + const container = document.createElement('div');
919 + ReactDOM.render(
920 + <React.StrictMode>
921 + <Foo />
922 + </React.StrictMode>,
923 + container,
924 + );
925
917 - expect(count).toBe(__DEV__ ? 2 : 1);
918 - expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
919 - // Note: we should display the first log because otherwise
920 - // there is a risk of suppressing warnings when they happen,
921 - // and on the next render they'd get deduplicated and ignored.
922 - expect(console.log).toBeCalledWith('foo 1');
923 - });
926 + expect(count).toBe(__DEV__ ? 2 : 1);
927 + expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
928 + // Note: we should display the first log because otherwise
929 + // there is a risk of suppressing warnings when they happen,
930 + // and on the next render they'd get deduplicated and ignored.
931 + expect(console.log).toBeCalledWith('foo 1');
932 + });
933
925 - it('does not disable logs for class double ctor', () => {
926 - spyOnDevAndProd(console, 'log');
934 + it('does not disable logs for class double ctor', () => {
935 + spyOnDevAndProd(console, 'log');
936 +
937 + let count = 0;
938 + class Foo extends React.Component {
939 + constructor(props) {
940 + super(props);
941 + count++;
942 + console.log('foo ' + count);
943 + }
944 + render() {
945 + return null;
946 + }
947 + }
948
928 - let count = 0;
929 - class Foo extends React.Component {
930 - constructor(props) {
931 - super(props);
932 - count++;
933 - console.log('foo ' + count);
949 + const container = document.createElement('div');
950 + ReactDOM.render(
951 + <React.StrictMode>
952 + <Foo />
953 + </React.StrictMode>,
954 + container,
955 + );
956 +
957 + expect(count).toBe(__DEV__ ? 2 : 1);
958 + expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
959 + // Note: we should display the first log because otherwise
960 + // there is a risk of suppressing warnings when they happen,
961 + // and on the next render they'd get deduplicated and ignored.
962 + expect(console.log).toBeCalledWith('foo 1');
963 + });
964 +
965 + it('does not disable logs for class double getDerivedStateFromProps', () => {
966 + spyOnDevAndProd(console, 'log');
967 +
968 + let count = 0;
969 + class Foo extends React.Component {
970 + state = {};
971 + static getDerivedStateFromProps() {
972 + count++;
973 + console.log('foo ' + count);
974 + return {};
975 + }
976 + render() {
977 + return null;
978 + }
979 }
935 - render() {
936 - return null;
980 +
981 + const container = document.createElement('div');
982 + ReactDOM.render(
983 + <React.StrictMode>
984 + <Foo />
985 + </React.StrictMode>,
986 + container,
987 + );
988 +
989 + expect(count).toBe(__DEV__ ? 2 : 1);
990 + expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
991 + // Note: we should display the first log because otherwise
992 + // there is a risk of suppressing warnings when they happen,
993 + // and on the next render they'd get deduplicated and ignored.
994 + expect(console.log).toBeCalledWith('foo 1');
995 + });
996 +
997 + it('does not disable logs for class double shouldComponentUpdate', () => {
998 + spyOnDevAndProd(console, 'log');
999 +
1000 + let count = 0;
1001 + class Foo extends React.Component {
1002 + state = {};
1003 + shouldComponentUpdate() {
1004 + count++;
1005 + console.log('foo ' + count);
1006 + return {};
1007 + }
1008 + render() {
1009 + return null;
1010 + }
1011 }
938 - }
1012
940 - const container = document.createElement('div');
941 - ReactDOM.render(
942 - <React.StrictMode>
943 - <Foo />
944 - </React.StrictMode>,
945 - container,
946 - );
1013 + const container = document.createElement('div');
1014 + ReactDOM.render(
1015 + <React.StrictMode>
1016 + <Foo />
1017 + </React.StrictMode>,
1018 + container,
1019 + );
1020 + // Trigger sCU:
1021 + ReactDOM.render(
1022 + <React.StrictMode>
1023 + <Foo />
1024 + </React.StrictMode>,
1025 + container,
1026 + );
1027
948 - expect(count).toBe(__DEV__ ? 2 : 1);
949 - expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
950 - // Note: we should display the first log because otherwise
951 - // there is a risk of suppressing warnings when they happen,
952 - // and on the next render they'd get deduplicated and ignored.
953 - expect(console.log).toBeCalledWith('foo 1');
954 - });
1028 + expect(count).toBe(__DEV__ ? 2 : 1);
1029 + expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
1030 + // Note: we should display the first log because otherwise
1031 + // there is a risk of suppressing warnings when they happen,
1032 + // and on the next render they'd get deduplicated and ignored.
1033 + expect(console.log).toBeCalledWith('foo 1');
1034 + });
1035
956 - it('does not disable logs for class double getDerivedStateFromProps', () => {
957 - spyOnDevAndProd(console, 'log');
1036 + it('does not disable logs for class state updaters', () => {
1037 + spyOnDevAndProd(console, 'log');
1038 +
1039 + let inst;
1040 + let count = 0;
1041 + class Foo extends React.Component {
1042 + state = {};
1043 + render() {
1044 + inst = this;
1045 + return null;
1046 + }
1047 + }
1048
959 - let count = 0;
960 - class Foo extends React.Component {
961 - state = {};
962 - static getDerivedStateFromProps() {
1049 + const container = document.createElement('div');
1050 + ReactDOM.render(
1051 + <React.StrictMode>
1052 + <Foo />
1053 + </React.StrictMode>,
1054 + container,
1055 + );
1056 + inst.setState(() => {
1057 count++;
1058 console.log('foo ' + count);
1059 return {};
966 - }
967 - render() {
1060 + });
1061 +
1062 + expect(count).toBe(__DEV__ ? 2 : 1);
1063 + expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
1064 + // Note: we should display the first log because otherwise
1065 + // there is a risk of suppressing warnings when they happen,
1066 + // and on the next render they'd get deduplicated and ignored.
1067 + expect(console.log).toBeCalledWith('foo 1');
1068 + });
1069 +
1070 + it('does not disable logs for function double render', () => {
1071 + spyOnDevAndProd(console, 'log');
1072 +
1073 + let count = 0;
1074 + function Foo() {
1075 + count++;
1076 + console.log('foo ' + count);
1077 return null;
1078 }
970 - }
1079
972 - const container = document.createElement('div');
973 - ReactDOM.render(
974 - <React.StrictMode>
975 - <Foo />
976 - </React.StrictMode>,
977 - container,
978 - );
1080 + const container = document.createElement('div');
1081 + ReactDOM.render(
1082 + <React.StrictMode>
1083 + <Foo />
1084 + </React.StrictMode>,
1085 + container,
1086 + );
1087
980 - expect(count).toBe(__DEV__ ? 2 : 1);
981 - expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
982 - // Note: we should display the first log because otherwise
983 - // there is a risk of suppressing warnings when they happen,
984 - // and on the next render they'd get deduplicated and ignored.
985 - expect(console.log).toBeCalledWith('foo 1');
986 - });
1088 + expect(count).toBe(__DEV__ ? 2 : 1);
1089 + expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
1090 + // Note: we should display the first log because otherwise
1091 + // there is a risk of suppressing warnings when they happen,
1092 + // and on the next render they'd get deduplicated and ignored.
1093 + expect(console.log).toBeCalledWith('foo 1');
1094 + });
1095 + } else {
1096 + it('disable logs for class double render', () => {
1097 + spyOnDevAndProd(console, 'log');
1098 +
1099 + let count = 0;
1100 + class Foo extends React.Component {
1101 + render() {
1102 + count++;
1103 + console.log('foo ' + count);
1104 + return null;
1105 + }
1106 + }
1107
988 - it('does not disable logs for class double shouldComponentUpdate', () => {
989 - spyOnDevAndProd(console, 'log');
1108 + const container = document.createElement('div');
1109 + ReactDOM.render(
1110 + <React.StrictMode>
1111 + <Foo />
1112 + </React.StrictMode>,
1113 + container,
1114 + );
1115
991 - let count = 0;
992 - class Foo extends React.Component {
993 - state = {};
994 - shouldComponentUpdate() {
995 - count++;
996 - console.log('foo ' + count);
997 - return {};
998 - }
999 - render() {
1000 - return null;
1116 + expect(count).toBe(__DEV__ ? 2 : 1);
1117 + expect(console.log).toBeCalledTimes(1);
1118 + // Note: we should display the first log because otherwise
1119 + // there is a risk of suppressing warnings when they happen,
1120 + // and on the next render they'd get deduplicated and ignored.
1121 + expect(console.log).toBeCalledWith('foo 1');
1122 + });
1123 +
1124 + it('disables logs for class double ctor', () => {
1125 + spyOnDevAndProd(console, 'log');
1126 +
1127 + let count = 0;
1128 + class Foo extends React.Component {
1129 + constructor(props) {
1130 + super(props);
1131 + count++;
1132 + console.log('foo ' + count);
1133 + }
1134 + render() {
1135 + return null;
1136 + }
1137 }
1002 - }
1138
1004 - const container = document.createElement('div');
1005 - ReactDOM.render(
1006 - <React.StrictMode>
1007 - <Foo />
1008 - </React.StrictMode>,
1009 - container,
1010 - );
1011 - // Trigger sCU:
1012 - ReactDOM.render(
1013 - <React.StrictMode>
1014 - <Foo />
1015 - </React.StrictMode>,
1016 - container,
1017 - );
1139 + const container = document.createElement('div');
1140 + ReactDOM.render(
1141 + <React.StrictMode>
1142 + <Foo />
1143 + </React.StrictMode>,
1144 + container,
1145 + );
1146
1019 - expect(count).toBe(__DEV__ ? 2 : 1);
1020 - expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
1021 - // Note: we should display the first log because otherwise
1022 - // there is a risk of suppressing warnings when they happen,
1023 - // and on the next render they'd get deduplicated and ignored.
1024 - expect(console.log).toBeCalledWith('foo 1');
1025 - });
1147 + expect(count).toBe(__DEV__ ? 2 : 1);
1148 + expect(console.log).toBeCalledTimes(1);
1149 + // Note: we should display the first log because otherwise
1150 + // there is a risk of suppressing warnings when they happen,
1151 + // and on the next render they'd get deduplicated and ignored.
1152 + expect(console.log).toBeCalledWith('foo 1');
1153 + });
1154
1027 - it('does not disable logs for class state updaters', () => {
1028 - spyOnDevAndProd(console, 'log');
1155 + it('disable logs for class double getDerivedStateFromProps', () => {
1156 + spyOnDevAndProd(console, 'log');
1157 +
1158 + let count = 0;
1159 + class Foo extends React.Component {
1160 + state = {};
1161 + static getDerivedStateFromProps() {
1162 + count++;
1163 + console.log('foo ' + count);
1164 + return {};
1165 + }
1166 + render() {
1167 + return null;
1168 + }
1169 + }
1170
1030 - let inst;
1031 - let count = 0;
1032 - class Foo extends React.Component {
1033 - state = {};
1034 - render() {
1035 - inst = this;
1036 - return null;
1171 + const container = document.createElement('div');
1172 + ReactDOM.render(
1173 + <React.StrictMode>
1174 + <Foo />
1175 + </React.StrictMode>,
1176 + container,
1177 + );
1178 +
1179 + expect(count).toBe(__DEV__ ? 2 : 1);
1180 + expect(console.log).toBeCalledTimes(1);
1181 + // Note: we should display the first log because otherwise
1182 + // there is a risk of suppressing warnings when they happen,
1183 + // and on the next render they'd get deduplicated and ignored.
1184 + expect(console.log).toBeCalledWith('foo 1');
1185 + });
1186 +
1187 + it('disable logs for class double shouldComponentUpdate', () => {
1188 + spyOnDevAndProd(console, 'log');
1189 +
1190 + let count = 0;
1191 + class Foo extends React.Component {
1192 + state = {};
1193 + shouldComponentUpdate() {
1194 + count++;
1195 + console.log('foo ' + count);
1196 + return {};
1197 + }
1198 + render() {
1199 + return null;
1200 + }
1201 }
1038 - }
1202
1040 - const container = document.createElement('div');
1041 - ReactDOM.render(
1042 - <React.StrictMode>
1043 - <Foo />
1044 - </React.StrictMode>,
1045 - container,
1046 - );
1047 - inst.setState(() => {
1048 - count++;
1049 - console.log('foo ' + count);
1050 - return {};
1203 + const container = document.createElement('div');
1204 + ReactDOM.render(
1205 + <React.StrictMode>
1206 + <Foo />
1207 + </React.StrictMode>,
1208 + container,
1209 + );
1210 + // Trigger sCU:
1211 + ReactDOM.render(
1212 + <React.StrictMode>
1213 + <Foo />
1214 + </React.StrictMode>,
1215 + container,
1216 + );
1217 +
1218 + expect(count).toBe(__DEV__ ? 2 : 1);
1219 + expect(console.log).toBeCalledTimes(1);
1220 + // Note: we should display the first log because otherwise
1221 + // there is a risk of suppressing warnings when they happen,
1222 + // and on the next render they'd get deduplicated and ignored.
1223 + expect(console.log).toBeCalledWith('foo 1');
1224 });
1225
1053 - expect(count).toBe(__DEV__ ? 2 : 1);
1054 - expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
1055 - // Note: we should display the first log because otherwise
1056 - // there is a risk of suppressing warnings when they happen,
1057 - // and on the next render they'd get deduplicated and ignored.
1058 - expect(console.log).toBeCalledWith('foo 1');
1059 - });
1226 + it('disable logs for class state updaters', () => {
1227 + spyOnDevAndProd(console, 'log');
1228 +
1229 + let inst;
1230 + let count = 0;
1231 + class Foo extends React.Component {
1232 + state = {};
1233 + render() {
1234 + inst = this;
1235 + return null;
1236 + }
1237 + }
1238
1061 - it('does not disable logs for function double render', () => {
1062 - spyOnDevAndProd(console, 'log');
1239 + const container = document.createElement('div');
1240 + ReactDOM.render(
1241 + <React.StrictMode>
1242 + <Foo />
1243 + </React.StrictMode>,
1244 + container,
1245 + );
1246 + inst.setState(() => {
1247 + count++;
1248 + console.log('foo ' + count);
1249 + return {};
1250 + });
1251 +
1252 + expect(count).toBe(__DEV__ ? 2 : 1);
1253 + expect(console.log).toBeCalledTimes(1);
1254 + // Note: we should display the first log because otherwise
1255 + // there is a risk of suppressing warnings when they happen,
1256 + // and on the next render they'd get deduplicated and ignored.
1257 + expect(console.log).toBeCalledWith('foo 1');
1258 + });
1259
1064 - let count = 0;
1065 - function Foo() {
1066 - count++;
1067 - console.log('foo ' + count);
1068 - return null;
1069 - }
1260 + it('disable logs for function double render', () => {
1261 + spyOnDevAndProd(console, 'log');
1262
1071 - const container = document.createElement('div');
1072 - ReactDOM.render(
1073 - <React.StrictMode>
1074 - <Foo />
1075 - </React.StrictMode>,
1076 - container,
1077 - );
1263 + let count = 0;
1264 + function Foo() {
1265 + count++;
1266 + console.log('foo ' + count);
1267 + return null;
1268 + }
1269
1079 - expect(count).toBe(__DEV__ ? 2 : 1);
1080 - expect(console.log).toBeCalledTimes(__DEV__ ? 2 : 1);
1081 - // Note: we should display the first log because otherwise
1082 - // there is a risk of suppressing warnings when they happen,
1083 - // and on the next render they'd get deduplicated and ignored.
1084 - expect(console.log).toBeCalledWith('foo 1');
1085 - });
1270 + const container = document.createElement('div');
1271 + ReactDOM.render(
1272 + <React.StrictMode>
1273 + <Foo />
1274 + </React.StrictMode>,
1275 + container,
1276 + );
1277 +
1278 + expect(count).toBe(__DEV__ ? 2 : 1);
1279 + expect(console.log).toBeCalledTimes(1);
1280 + // Note: we should display the first log because otherwise
1281 + // there is a risk of suppressing warnings when they happen,
1282 + // and on the next render they'd get deduplicated and ignored.
1283 + expect(console.log).toBeCalledWith('foo 1');
1284 + });
1285 + }
1286 });
1287 });
packages/shared/ReactFeatureFlags.js
+2
@@ -175,3 +175,5 @@ export const enableSyncDefaultUpdates = true;
175 export const allowConcurrentByDefault = false;
176
177 export const enablePersistentOffscreenHostContainer = false;
178 +
179 +export const consoleManagedByDevToolsDuringStrictMode = false;
packages/shared/forks/ReactFeatureFlags.native-fb.js
+2
@@ -69,6 +69,8 @@ export const enableLazyContextPropagation = false;
69 export const enableSyncDefaultUpdates = true;
70 export const allowConcurrentByDefault = true;
71
72 +export const consoleManagedByDevToolsDuringStrictMode = false;
73 +
74 // Flow magic to verify the exports of this file match the original version.
75 // eslint-disable-next-line no-unused-vars
76 type Check<_X, Y: _X, X: Y = _X> = null;
packages/shared/forks/ReactFeatureFlags.native-oss.js
+2
@@ -61,6 +61,8 @@ export const enableSyncDefaultUpdates = true;
61 export const allowConcurrentByDefault = false;
62 export const enablePersistentOffscreenHostContainer = false;
63
64 +export const consoleManagedByDevToolsDuringStrictMode = false;
65 +
66 // Flow magic to verify the exports of this file match the original version.
67 // eslint-disable-next-line no-unused-vars
68 type Check<_X, Y: _X, X: Y = _X> = null;
packages/shared/forks/ReactFeatureFlags.test-renderer.js
+2
@@ -61,6 +61,8 @@ export const enableSyncDefaultUpdates = true;
61 export const allowConcurrentByDefault = false;
62 export const enablePersistentOffscreenHostContainer = false;
63
64 +export const consoleManagedByDevToolsDuringStrictMode = true;
65 +
66 // Flow magic to verify the exports of this file match the original version.
67 // eslint-disable-next-line no-unused-vars
68 type Check<_X, Y: _X, X: Y = _X> = null;
packages/shared/forks/ReactFeatureFlags.test-renderer.native.js
+2
@@ -61,6 +61,8 @@ export const enableSyncDefaultUpdates = true;
61 export const allowConcurrentByDefault = true;
62 export const enablePersistentOffscreenHostContainer = false;
63
64 +export const consoleManagedByDevToolsDuringStrictMode = true;
65 +
66 // Flow magic to verify the exports of this file match the original version.
67 // eslint-disable-next-line no-unused-vars
68 type Check<_X, Y: _X, X: Y = _X> = null;
packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
+2
@@ -61,6 +61,8 @@ export const enableSyncDefaultUpdates = true;
61 export const allowConcurrentByDefault = true;
62 export const enablePersistentOffscreenHostContainer = false;
63
64 +export const consoleManagedByDevToolsDuringStrictMode = true;
65 +
66 // Flow magic to verify the exports of this file match the original version.
67 // eslint-disable-next-line no-unused-vars
68 type Check<_X, Y: _X, X: Y = _X> = null;
packages/shared/forks/ReactFeatureFlags.testing.js
+2
@@ -61,6 +61,8 @@ export const enableSyncDefaultUpdates = true;
61 export const allowConcurrentByDefault = false;
62 export const enablePersistentOffscreenHostContainer = false;
63
64 +export const consoleManagedByDevToolsDuringStrictMode = true;
65 +
66 // Flow magic to verify the exports of this file match the original version.
67 // eslint-disable-next-line no-unused-vars
68 type Check<_X, Y: _X, X: Y = _X> = null;
packages/shared/forks/ReactFeatureFlags.testing.www.js
+2
@@ -61,6 +61,8 @@ export const enableSyncDefaultUpdates = true;
61 export const allowConcurrentByDefault = true;
62 export const enablePersistentOffscreenHostContainer = false;
63
64 +export const consoleManagedByDevToolsDuringStrictMode = true;
65 +
66 // Flow magic to verify the exports of this file match the original version.
67 // eslint-disable-next-line no-unused-vars
68 type Check<_X, Y: _X, X: Y = _X> = null;
packages/shared/forks/ReactFeatureFlags.www-dynamic.js
+2
@@ -59,3 +59,5 @@ export const enableLazyContextPropagation = __VARIANT__;
59 export const enableSyncDefaultUpdates = __VARIANT__;
60 export const allowConcurrentByDefault = true;
61 export const enablePersistentOffscreenHostContainer = false;
62 +
63 +export const consoleManagedByDevToolsDuringStrictMode = true;
packages/shared/forks/ReactFeatureFlags.www.js
+2
@@ -97,6 +97,8 @@ export const deletedTreeCleanUpLevel = 3;
97
98 export const enablePersistentOffscreenHostContainer = false;
99
100 +export const consoleManagedByDevToolsDuringStrictMode = true;
101 +
102 // Flow magic to verify the exports of this file match the original version.
103 // eslint-disable-next-line no-unused-vars
104 type Check<_X, Y: _X, X: Y = _X> = null;