Skip to content

Commit 54e2e34

Browse files
committed
Remove feature flag enableRenderableContext (#33505)
The flag is fully rolled out. DiffTrain build for [6c86e56](6c86e56)
1 parent 4ec413b commit 54e2e34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3144
-4401
lines changed

compiled/facebook-www/JSXDEVRuntime-dev.classic.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,10 @@ __DEV__ &&
4848
) {
4949
case REACT_PORTAL_TYPE:
5050
return "Portal";
51-
case REACT_PROVIDER_TYPE:
52-
if (enableRenderableContext) break;
53-
else return (type._context.displayName || "Context") + ".Provider";
5451
case REACT_CONTEXT_TYPE:
55-
return enableRenderableContext
56-
? (type.displayName || "Context") + ".Provider"
57-
: (type.displayName || "Context") + ".Consumer";
52+
return (type.displayName || "Context") + ".Provider";
5853
case REACT_CONSUMER_TYPE:
59-
if (enableRenderableContext)
60-
return (type._context.displayName || "Context") + ".Consumer";
61-
break;
54+
return (type._context.displayName || "Context") + ".Consumer";
6255
case REACT_FORWARD_REF_TYPE:
6356
var innerType = type.render;
6457
type = type.displayName;
@@ -307,7 +300,6 @@ __DEV__ &&
307300
dynamicFeatureFlags = require("ReactFeatureFlags"),
308301
disableDefaultPropsExceptForClasses =
309302
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
310-
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
311303
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
312304
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
313305
enableViewTransition = dynamicFeatureFlags.enableViewTransition;
@@ -319,7 +311,6 @@ __DEV__ &&
319311
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
320312
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
321313
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
322-
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
323314
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
324315
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
325316
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),

compiled/facebook-www/JSXDEVRuntime-dev.modern.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,10 @@ __DEV__ &&
4848
) {
4949
case REACT_PORTAL_TYPE:
5050
return "Portal";
51-
case REACT_PROVIDER_TYPE:
52-
if (enableRenderableContext) break;
53-
else return (type._context.displayName || "Context") + ".Provider";
5451
case REACT_CONTEXT_TYPE:
55-
return enableRenderableContext
56-
? (type.displayName || "Context") + ".Provider"
57-
: (type.displayName || "Context") + ".Consumer";
52+
return (type.displayName || "Context") + ".Provider";
5853
case REACT_CONSUMER_TYPE:
59-
if (enableRenderableContext)
60-
return (type._context.displayName || "Context") + ".Consumer";
61-
break;
54+
return (type._context.displayName || "Context") + ".Consumer";
6255
case REACT_FORWARD_REF_TYPE:
6356
var innerType = type.render;
6457
type = type.displayName;
@@ -307,7 +300,6 @@ __DEV__ &&
307300
dynamicFeatureFlags = require("ReactFeatureFlags"),
308301
disableDefaultPropsExceptForClasses =
309302
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
310-
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
311303
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
312304
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
313305
enableViewTransition = dynamicFeatureFlags.enableViewTransition;
@@ -319,7 +311,6 @@ __DEV__ &&
319311
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
320312
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
321313
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
322-
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
323314
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
324315
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
325316
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c38e26897848374c34ac6b651fce4a9088ed4dd0
1+
6c86e56a0fa3c8f253da133330cd5b7d1d20e7e5
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c38e26897848374c34ac6b651fce4a9088ed4dd0
1+
6c86e56a0fa3c8f253da133330cd5b7d1d20e7e5

compiled/facebook-www/React-dev.classic.js

Lines changed: 12 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,10 @@ __DEV__ &&
122122
) {
123123
case REACT_PORTAL_TYPE:
124124
return "Portal";
125-
case REACT_PROVIDER_TYPE:
126-
if (enableRenderableContext) break;
127-
else return (type._context.displayName || "Context") + ".Provider";
128125
case REACT_CONTEXT_TYPE:
129-
return enableRenderableContext
130-
? (type.displayName || "Context") + ".Provider"
131-
: (type.displayName || "Context") + ".Consumer";
126+
return (type.displayName || "Context") + ".Provider";
132127
case REACT_CONSUMER_TYPE:
133-
if (enableRenderableContext)
134-
return (type._context.displayName || "Context") + ".Consumer";
135-
break;
128+
return (type._context.displayName || "Context") + ".Consumer";
136129
case REACT_FORWARD_REF_TYPE:
137130
var innerType = type.render;
138131
type = type.displayName;
@@ -753,7 +746,6 @@ __DEV__ &&
753746
var dynamicFeatureFlags = require("ReactFeatureFlags"),
754747
disableDefaultPropsExceptForClasses =
755748
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
756-
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
757749
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
758750
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
759751
enableViewTransition = dynamicFeatureFlags.enableViewTransition;
@@ -765,7 +757,6 @@ __DEV__ &&
765757
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
766758
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
767759
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
768-
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
769760
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
770761
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
771762
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
@@ -1151,74 +1142,22 @@ __DEV__ &&
11511142
return props;
11521143
};
11531144
exports.createContext = function (defaultValue) {
1154-
var context = {
1145+
defaultValue = {
11551146
$$typeof: REACT_CONTEXT_TYPE,
11561147
_currentValue: defaultValue,
11571148
_currentValue2: defaultValue,
11581149
_threadCount: 0,
11591150
Provider: null,
11601151
Consumer: null
11611152
};
1162-
enableRenderableContext
1163-
? ((context.Provider = context),
1164-
(context.Consumer = {
1165-
$$typeof: REACT_CONSUMER_TYPE,
1166-
_context: context
1167-
}))
1168-
: ((context.Provider = {
1169-
$$typeof: REACT_PROVIDER_TYPE,
1170-
_context: context
1171-
}),
1172-
(defaultValue = { $$typeof: REACT_CONTEXT_TYPE, _context: context }),
1173-
Object.defineProperties(defaultValue, {
1174-
Provider: {
1175-
get: function () {
1176-
return context.Provider;
1177-
},
1178-
set: function (_Provider) {
1179-
context.Provider = _Provider;
1180-
}
1181-
},
1182-
_currentValue: {
1183-
get: function () {
1184-
return context._currentValue;
1185-
},
1186-
set: function (_currentValue) {
1187-
context._currentValue = _currentValue;
1188-
}
1189-
},
1190-
_currentValue2: {
1191-
get: function () {
1192-
return context._currentValue2;
1193-
},
1194-
set: function (_currentValue2) {
1195-
context._currentValue2 = _currentValue2;
1196-
}
1197-
},
1198-
_threadCount: {
1199-
get: function () {
1200-
return context._threadCount;
1201-
},
1202-
set: function (_threadCount) {
1203-
context._threadCount = _threadCount;
1204-
}
1205-
},
1206-
Consumer: {
1207-
get: function () {
1208-
return context.Consumer;
1209-
}
1210-
},
1211-
displayName: {
1212-
get: function () {
1213-
return context.displayName;
1214-
},
1215-
set: function () {}
1216-
}
1217-
}),
1218-
(context.Consumer = defaultValue));
1219-
context._currentRenderer = null;
1220-
context._currentRenderer2 = null;
1221-
return context;
1153+
defaultValue.Provider = defaultValue;
1154+
defaultValue.Consumer = {
1155+
$$typeof: REACT_CONSUMER_TYPE,
1156+
_context: defaultValue
1157+
};
1158+
defaultValue._currentRenderer = null;
1159+
defaultValue._currentRenderer2 = null;
1160+
return defaultValue;
12221161
};
12231162
exports.createElement = function (type, config, children) {
12241163
for (var i = 2; i < arguments.length; i++)
@@ -1537,7 +1476,7 @@ __DEV__ &&
15371476
exports.useTransition = function () {
15381477
return resolveDispatcher().useTransition();
15391478
};
1540-
exports.version = "19.2.0-www-classic-c38e2689-20250609";
1479+
exports.version = "19.2.0-www-classic-6c86e56a-20250611";
15411480
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15421481
"function" ===
15431482
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 12 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,10 @@ __DEV__ &&
122122
) {
123123
case REACT_PORTAL_TYPE:
124124
return "Portal";
125-
case REACT_PROVIDER_TYPE:
126-
if (enableRenderableContext) break;
127-
else return (type._context.displayName || "Context") + ".Provider";
128125
case REACT_CONTEXT_TYPE:
129-
return enableRenderableContext
130-
? (type.displayName || "Context") + ".Provider"
131-
: (type.displayName || "Context") + ".Consumer";
126+
return (type.displayName || "Context") + ".Provider";
132127
case REACT_CONSUMER_TYPE:
133-
if (enableRenderableContext)
134-
return (type._context.displayName || "Context") + ".Consumer";
135-
break;
128+
return (type._context.displayName || "Context") + ".Consumer";
136129
case REACT_FORWARD_REF_TYPE:
137130
var innerType = type.render;
138131
type = type.displayName;
@@ -753,7 +746,6 @@ __DEV__ &&
753746
var dynamicFeatureFlags = require("ReactFeatureFlags"),
754747
disableDefaultPropsExceptForClasses =
755748
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
756-
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
757749
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
758750
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
759751
enableViewTransition = dynamicFeatureFlags.enableViewTransition;
@@ -765,7 +757,6 @@ __DEV__ &&
765757
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
766758
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
767759
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
768-
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
769760
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
770761
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
771762
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
@@ -1151,74 +1142,22 @@ __DEV__ &&
11511142
return props;
11521143
};
11531144
exports.createContext = function (defaultValue) {
1154-
var context = {
1145+
defaultValue = {
11551146
$$typeof: REACT_CONTEXT_TYPE,
11561147
_currentValue: defaultValue,
11571148
_currentValue2: defaultValue,
11581149
_threadCount: 0,
11591150
Provider: null,
11601151
Consumer: null
11611152
};
1162-
enableRenderableContext
1163-
? ((context.Provider = context),
1164-
(context.Consumer = {
1165-
$$typeof: REACT_CONSUMER_TYPE,
1166-
_context: context
1167-
}))
1168-
: ((context.Provider = {
1169-
$$typeof: REACT_PROVIDER_TYPE,
1170-
_context: context
1171-
}),
1172-
(defaultValue = { $$typeof: REACT_CONTEXT_TYPE, _context: context }),
1173-
Object.defineProperties(defaultValue, {
1174-
Provider: {
1175-
get: function () {
1176-
return context.Provider;
1177-
},
1178-
set: function (_Provider) {
1179-
context.Provider = _Provider;
1180-
}
1181-
},
1182-
_currentValue: {
1183-
get: function () {
1184-
return context._currentValue;
1185-
},
1186-
set: function (_currentValue) {
1187-
context._currentValue = _currentValue;
1188-
}
1189-
},
1190-
_currentValue2: {
1191-
get: function () {
1192-
return context._currentValue2;
1193-
},
1194-
set: function (_currentValue2) {
1195-
context._currentValue2 = _currentValue2;
1196-
}
1197-
},
1198-
_threadCount: {
1199-
get: function () {
1200-
return context._threadCount;
1201-
},
1202-
set: function (_threadCount) {
1203-
context._threadCount = _threadCount;
1204-
}
1205-
},
1206-
Consumer: {
1207-
get: function () {
1208-
return context.Consumer;
1209-
}
1210-
},
1211-
displayName: {
1212-
get: function () {
1213-
return context.displayName;
1214-
},
1215-
set: function () {}
1216-
}
1217-
}),
1218-
(context.Consumer = defaultValue));
1219-
context._currentRenderer = null;
1220-
context._currentRenderer2 = null;
1221-
return context;
1153+
defaultValue.Provider = defaultValue;
1154+
defaultValue.Consumer = {
1155+
$$typeof: REACT_CONSUMER_TYPE,
1156+
_context: defaultValue
1157+
};
1158+
defaultValue._currentRenderer = null;
1159+
defaultValue._currentRenderer2 = null;
1160+
return defaultValue;
12221161
};
12231162
exports.createElement = function (type, config, children) {
12241163
for (var i = 2; i < arguments.length; i++)
@@ -1537,7 +1476,7 @@ __DEV__ &&
15371476
exports.useTransition = function () {
15381477
return resolveDispatcher().useTransition();
15391478
};
1540-
exports.version = "19.2.0-www-modern-c38e2689-20250609";
1479+
exports.version = "19.2.0-www-modern-6c86e56a-20250611";
15411480
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15421481
"function" ===
15431482
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
var dynamicFeatureFlags = require("ReactFeatureFlags"),
1515
disableDefaultPropsExceptForClasses =
1616
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
17-
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
1817
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
1918
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
2019
enableViewTransition = dynamicFeatureFlags.enableViewTransition,
@@ -26,7 +25,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"),
2625
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
2726
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
2827
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
29-
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
3028
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
3129
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
3230
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
@@ -495,17 +493,11 @@ exports.createContext = function (defaultValue) {
495493
Provider: null,
496494
Consumer: null
497495
};
498-
enableRenderableContext
499-
? ((defaultValue.Provider = defaultValue),
500-
(defaultValue.Consumer = {
501-
$$typeof: REACT_CONSUMER_TYPE,
502-
_context: defaultValue
503-
}))
504-
: ((defaultValue.Provider = {
505-
$$typeof: REACT_PROVIDER_TYPE,
506-
_context: defaultValue
507-
}),
508-
(defaultValue.Consumer = defaultValue));
496+
defaultValue.Provider = defaultValue;
497+
defaultValue.Consumer = {
498+
$$typeof: REACT_CONSUMER_TYPE,
499+
_context: defaultValue
500+
};
509501
return defaultValue;
510502
};
511503
exports.createElement = function (type, config, children) {
@@ -635,4 +627,4 @@ exports.useSyncExternalStore = function (
635627
exports.useTransition = function () {
636628
return ReactSharedInternals.H.useTransition();
637629
};
638-
exports.version = "19.2.0-www-classic-c38e2689-20250609";
630+
exports.version = "19.2.0-www-classic-6c86e56a-20250611";

0 commit comments

Comments
 (0)