Skip to content

Commit 62b9d0a

Browse files
committed
[cleanup] remove enableHostSingletons feature flag (#27583)
The flag is enabled everywhere, I think we can remove it now. DiffTrain build for [1a65d03](1a65d03)
1 parent cecbf4f commit 62b9d0a

7 files changed

+70
-85
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ee68446ff198755bd38202ac9139275b657968b0
1+
1a65d036ef057b07a6b15f5604e399f91bc5ed73

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,4 +579,4 @@ exports.useSyncExternalStore = function (
579579
exports.useTransition = function () {
580580
return ReactCurrentDispatcher.current.useTransition();
581581
};
582-
exports.version = "18.3.0-www-modern-226f03d3";
582+
exports.version = "18.3.0-www-modern-a7574064";

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

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ if (__DEV__) {
155155
var enableProfilerNestedUpdateScheduledHook =
156156
dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook;
157157
var createRootStrictEffectsByDefault = false;
158-
var enableHostSingletons = true;
159158
var enableClientRenderFallbackOnTextMismatch = false;
160159

161160
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; // Note: we'll want to remove this when we to userland implementation.
@@ -34885,7 +34884,7 @@ if (__DEV__) {
3488534884
return root;
3488634885
}
3488734886

34888-
var ReactVersion = "18.3.0-www-classic-b7cd3754";
34887+
var ReactVersion = "18.3.0-www-classic-c4c3bba3";
3488934888

3489034889
function createPortal$1(
3489134890
children,
@@ -43168,22 +43167,20 @@ if (__DEV__) {
4316843167
textInstance.nodeValue = text;
4316943168
}
4317043169
function clearContainer(container) {
43171-
{
43172-
var nodeType = container.nodeType;
43170+
var nodeType = container.nodeType;
4317343171

43174-
if (nodeType === DOCUMENT_NODE) {
43175-
clearContainerSparingly(container);
43176-
} else if (nodeType === ELEMENT_NODE) {
43177-
switch (container.nodeName) {
43178-
case "HEAD":
43179-
case "HTML":
43180-
case "BODY":
43181-
clearContainerSparingly(container);
43182-
return;
43172+
if (nodeType === DOCUMENT_NODE) {
43173+
clearContainerSparingly(container);
43174+
} else if (nodeType === ELEMENT_NODE) {
43175+
switch (container.nodeName) {
43176+
case "HEAD":
43177+
case "HTML":
43178+
case "BODY":
43179+
clearContainerSparingly(container);
43180+
return;
4318343181

43184-
default: {
43185-
container.textContent = "";
43186-
}
43182+
default: {
43183+
container.textContent = "";
4318743184
}
4318843185
}
4318943186
}
@@ -43254,13 +43251,13 @@ if (__DEV__) {
4325443251
var anyProps = props;
4325543252

4325643253
if (element.nodeName.toLowerCase() !== type.toLowerCase()) {
43257-
if (!inRootOrSingleton || !enableHostSingletons) {
43254+
if (!inRootOrSingleton) {
4325843255
// Usually we error for mismatched tags.
4325943256
{
4326043257
return null;
4326143258
}
4326243259
} // In root or singleton parents we skip past mismatched instances.
43263-
} else if (!inRootOrSingleton || !enableHostSingletons) {
43260+
} else if (!inRootOrSingleton) {
4326443261
// Match
4326543262
{
4326643263
return element;
@@ -43390,7 +43387,7 @@ if (__DEV__) {
4339043387
if (text === "") return null;
4339143388

4339243389
while (instance.nodeType !== TEXT_NODE) {
43393-
if (!inRootOrSingleton || !enableHostSingletons) {
43390+
if (!inRootOrSingleton) {
4339443391
return null;
4339543392
}
4339643393

@@ -43407,7 +43404,7 @@ if (__DEV__) {
4340743404
}
4340843405
function canHydrateSuspenseInstance(instance, inRootOrSingleton) {
4340943406
while (instance.nodeType !== COMMENT_NODE) {
43410-
if (!inRootOrSingleton || !enableHostSingletons) {
43407+
if (!inRootOrSingleton) {
4341143408
return null;
4341243409
}
4341343410

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

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ if (__DEV__) {
141141
var enableProfilerNestedUpdateScheduledHook =
142142
dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook;
143143
var createRootStrictEffectsByDefault = false;
144-
var enableHostSingletons = true;
145144
var enableClientRenderFallbackOnTextMismatch = false;
146145

147146
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; // Note: we'll want to remove this when we to userland implementation.
@@ -34706,7 +34705,7 @@ if (__DEV__) {
3470634705
return root;
3470734706
}
3470834707

34709-
var ReactVersion = "18.3.0-www-modern-04110a6d";
34708+
var ReactVersion = "18.3.0-www-modern-422c0869";
3471034709

3471134710
function createPortal$1(
3471234711
children,
@@ -43654,22 +43653,20 @@ if (__DEV__) {
4365443653
textInstance.nodeValue = text;
4365543654
}
4365643655
function clearContainer(container) {
43657-
{
43658-
var nodeType = container.nodeType;
43656+
var nodeType = container.nodeType;
4365943657

43660-
if (nodeType === DOCUMENT_NODE) {
43661-
clearContainerSparingly(container);
43662-
} else if (nodeType === ELEMENT_NODE) {
43663-
switch (container.nodeName) {
43664-
case "HEAD":
43665-
case "HTML":
43666-
case "BODY":
43667-
clearContainerSparingly(container);
43668-
return;
43658+
if (nodeType === DOCUMENT_NODE) {
43659+
clearContainerSparingly(container);
43660+
} else if (nodeType === ELEMENT_NODE) {
43661+
switch (container.nodeName) {
43662+
case "HEAD":
43663+
case "HTML":
43664+
case "BODY":
43665+
clearContainerSparingly(container);
43666+
return;
4366943667

43670-
default: {
43671-
container.textContent = "";
43672-
}
43668+
default: {
43669+
container.textContent = "";
4367343670
}
4367443671
}
4367543672
}
@@ -43740,13 +43737,13 @@ if (__DEV__) {
4374043737
var anyProps = props;
4374143738

4374243739
if (element.nodeName.toLowerCase() !== type.toLowerCase()) {
43743-
if (!inRootOrSingleton || !enableHostSingletons) {
43740+
if (!inRootOrSingleton) {
4374443741
// Usually we error for mismatched tags.
4374543742
{
4374643743
return null;
4374743744
}
4374843745
} // In root or singleton parents we skip past mismatched instances.
43749-
} else if (!inRootOrSingleton || !enableHostSingletons) {
43746+
} else if (!inRootOrSingleton) {
4375043747
// Match
4375143748
{
4375243749
return element;
@@ -43876,7 +43873,7 @@ if (__DEV__) {
4387643873
if (text === "") return null;
4387743874

4387843875
while (instance.nodeType !== TEXT_NODE) {
43879-
if (!inRootOrSingleton || !enableHostSingletons) {
43876+
if (!inRootOrSingleton) {
4388043877
return null;
4388143878
}
4388243879

@@ -43893,7 +43890,7 @@ if (__DEV__) {
4389343890
}
4389443891
function canHydrateSuspenseInstance(instance, inRootOrSingleton) {
4389543892
while (instance.nodeType !== COMMENT_NODE) {
43896-
if (!inRootOrSingleton || !enableHostSingletons) {
43893+
if (!inRootOrSingleton) {
4389743894
return null;
4389843895
}
4389943896

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

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ if (__DEV__) {
147147
var enableProfilerNestedUpdateScheduledHook =
148148
dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook;
149149
var createRootStrictEffectsByDefault = false;
150-
var enableHostSingletons = true;
151150
var enableClientRenderFallbackOnTextMismatch = false;
152151

153152
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; // Note: we'll want to remove this when we to userland implementation.
@@ -35509,7 +35508,7 @@ if (__DEV__) {
3550935508
return root;
3551035509
}
3551135510

35512-
var ReactVersion = "18.3.0-www-classic-013758d2";
35511+
var ReactVersion = "18.3.0-www-classic-046bb5e3";
3551335512

3551435513
function createPortal$1(
3551535514
children,
@@ -43792,22 +43791,20 @@ if (__DEV__) {
4379243791
textInstance.nodeValue = text;
4379343792
}
4379443793
function clearContainer(container) {
43795-
{
43796-
var nodeType = container.nodeType;
43794+
var nodeType = container.nodeType;
4379743795

43798-
if (nodeType === DOCUMENT_NODE) {
43799-
clearContainerSparingly(container);
43800-
} else if (nodeType === ELEMENT_NODE) {
43801-
switch (container.nodeName) {
43802-
case "HEAD":
43803-
case "HTML":
43804-
case "BODY":
43805-
clearContainerSparingly(container);
43806-
return;
43796+
if (nodeType === DOCUMENT_NODE) {
43797+
clearContainerSparingly(container);
43798+
} else if (nodeType === ELEMENT_NODE) {
43799+
switch (container.nodeName) {
43800+
case "HEAD":
43801+
case "HTML":
43802+
case "BODY":
43803+
clearContainerSparingly(container);
43804+
return;
4380743805

43808-
default: {
43809-
container.textContent = "";
43810-
}
43806+
default: {
43807+
container.textContent = "";
4381143808
}
4381243809
}
4381343810
}
@@ -43878,13 +43875,13 @@ if (__DEV__) {
4387843875
var anyProps = props;
4387943876

4388043877
if (element.nodeName.toLowerCase() !== type.toLowerCase()) {
43881-
if (!inRootOrSingleton || !enableHostSingletons) {
43878+
if (!inRootOrSingleton) {
4388243879
// Usually we error for mismatched tags.
4388343880
{
4388443881
return null;
4388543882
}
4388643883
} // In root or singleton parents we skip past mismatched instances.
43887-
} else if (!inRootOrSingleton || !enableHostSingletons) {
43884+
} else if (!inRootOrSingleton) {
4388843885
// Match
4388943886
{
4389043887
return element;
@@ -44014,7 +44011,7 @@ if (__DEV__) {
4401444011
if (text === "") return null;
4401544012

4401644013
while (instance.nodeType !== TEXT_NODE) {
44017-
if (!inRootOrSingleton || !enableHostSingletons) {
44014+
if (!inRootOrSingleton) {
4401844015
return null;
4401944016
}
4402044017

@@ -44031,7 +44028,7 @@ if (__DEV__) {
4403144028
}
4403244029
function canHydrateSuspenseInstance(instance, inRootOrSingleton) {
4403344030
while (instance.nodeType !== COMMENT_NODE) {
44034-
if (!inRootOrSingleton || !enableHostSingletons) {
44031+
if (!inRootOrSingleton) {
4403544032
return null;
4403644033
}
4403744034

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

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ if (__DEV__) {
133133
var enableProfilerNestedUpdateScheduledHook =
134134
dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook;
135135
var createRootStrictEffectsByDefault = false;
136-
var enableHostSingletons = true;
137136
var enableClientRenderFallbackOnTextMismatch = false;
138137

139138
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; // Note: we'll want to remove this when we to userland implementation.
@@ -35330,7 +35329,7 @@ if (__DEV__) {
3533035329
return root;
3533135330
}
3533235331

35333-
var ReactVersion = "18.3.0-www-modern-226f03d3";
35332+
var ReactVersion = "18.3.0-www-modern-a7574064";
3533435333

3533535334
function createPortal$1(
3533635335
children,
@@ -44278,22 +44277,20 @@ if (__DEV__) {
4427844277
textInstance.nodeValue = text;
4427944278
}
4428044279
function clearContainer(container) {
44281-
{
44282-
var nodeType = container.nodeType;
44280+
var nodeType = container.nodeType;
4428344281

44284-
if (nodeType === DOCUMENT_NODE) {
44285-
clearContainerSparingly(container);
44286-
} else if (nodeType === ELEMENT_NODE) {
44287-
switch (container.nodeName) {
44288-
case "HEAD":
44289-
case "HTML":
44290-
case "BODY":
44291-
clearContainerSparingly(container);
44292-
return;
44282+
if (nodeType === DOCUMENT_NODE) {
44283+
clearContainerSparingly(container);
44284+
} else if (nodeType === ELEMENT_NODE) {
44285+
switch (container.nodeName) {
44286+
case "HEAD":
44287+
case "HTML":
44288+
case "BODY":
44289+
clearContainerSparingly(container);
44290+
return;
4429344291

44294-
default: {
44295-
container.textContent = "";
44296-
}
44292+
default: {
44293+
container.textContent = "";
4429744294
}
4429844295
}
4429944296
}
@@ -44364,13 +44361,13 @@ if (__DEV__) {
4436444361
var anyProps = props;
4436544362

4436644363
if (element.nodeName.toLowerCase() !== type.toLowerCase()) {
44367-
if (!inRootOrSingleton || !enableHostSingletons) {
44364+
if (!inRootOrSingleton) {
4436844365
// Usually we error for mismatched tags.
4436944366
{
4437044367
return null;
4437144368
}
4437244369
} // In root or singleton parents we skip past mismatched instances.
44373-
} else if (!inRootOrSingleton || !enableHostSingletons) {
44370+
} else if (!inRootOrSingleton) {
4437444371
// Match
4437544372
{
4437644373
return element;
@@ -44500,7 +44497,7 @@ if (__DEV__) {
4450044497
if (text === "") return null;
4450144498

4450244499
while (instance.nodeType !== TEXT_NODE) {
44503-
if (!inRootOrSingleton || !enableHostSingletons) {
44500+
if (!inRootOrSingleton) {
4450444501
return null;
4450544502
}
4450644503

@@ -44517,7 +44514,7 @@ if (__DEV__) {
4451744514
}
4451844515
function canHydrateSuspenseInstance(instance, inRootOrSingleton) {
4451944516
while (instance.nodeType !== COMMENT_NODE) {
44520-
if (!inRootOrSingleton || !enableHostSingletons) {
44517+
if (!inRootOrSingleton) {
4452144518
return null;
4452244519
}
4452344520

compiled/facebook-www/WARNINGS

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@
367367
"contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead."
368368
"copyWithRename() expects paths of the same length"
369369
"copyWithRename() expects paths to be the same except for the deepest key"
370-
"createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."
371370
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
372371
"dispatchCommand was called with a ref that isn't a native component. Use React.forwardRef to get access to the underlying native component"
373372
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
@@ -384,9 +383,7 @@
384383
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?"
385384
"memo: The first argument must be a component. Instead received: %s"
386385
"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead."
387-
"render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app."
388386
"render(...): Expected the last optional `callback` argument to be a function. Instead received: %s."
389-
"render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container."
390387
"render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container."
391388
"render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."
392389
"render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."

0 commit comments

Comments
 (0)