Skip to content

Commit 1dc15b7

Browse files
committed
Revert "Support writing to this.refs from userspace" (#28877)
Reverts #28867 It broke some tests, reverting until we figure out why to avoid having too much delay in the sync. DiffTrain build for commit f5ce642.
1 parent 13710c6 commit 1dc15b7

File tree

13 files changed

+57
-40
lines changed

13 files changed

+57
-40
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<1af14f0d0942bd1e022dac734e776b15>>
10+
* @generated SignedSource<<f80067582f8d263400103116af004cc1>>
1111
*/
1212

1313
"use strict";
@@ -12589,6 +12589,7 @@ if (__DEV__) {
1258912589
var instance = workInProgress.stateNode;
1259012590
instance.props = newProps;
1259112591
instance.state = workInProgress.memoizedState;
12592+
instance.refs = {};
1259212593
initializeUpdateQueue(workInProgress);
1259312594
var contextType = ctor.contextType;
1259412595

@@ -26672,7 +26673,7 @@ if (__DEV__) {
2667226673
return root;
2667326674
}
2667426675

26675-
var ReactVersion = "19.0.0-canary-4a670971";
26676+
var ReactVersion = "19.0.0-canary-a47ffde4";
2667626677

2667726678
/*
2667826679
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<c7247ab9f63052e5a0750fdb7aaf6996>>
10+
* @generated SignedSource<<f3eb1768c908f25292e8f079ec672f53>>
1111
*/
1212

1313
"use strict";
@@ -3426,6 +3426,7 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
34263426
var instance = workInProgress.stateNode;
34273427
instance.props = newProps;
34283428
instance.state = workInProgress.memoizedState;
3429+
instance.refs = {};
34293430
initializeUpdateQueue(workInProgress);
34303431
var contextType = ctor.contextType;
34313432
"object" === typeof contextType && null !== contextType
@@ -9143,7 +9144,7 @@ var devToolsConfig$jscomp$inline_1019 = {
91439144
throw Error("TestRenderer does not support findFiberByHostInstance()");
91449145
},
91459146
bundleType: 0,
9146-
version: "19.0.0-canary-3c5c4140",
9147+
version: "19.0.0-canary-7a48fce4",
91479148
rendererPackageName: "react-test-renderer"
91489149
};
91499150
var internals$jscomp$inline_1238 = {
@@ -9174,7 +9175,7 @@ var internals$jscomp$inline_1238 = {
91749175
scheduleRoot: null,
91759176
setRefreshHandler: null,
91769177
getCurrentFiber: null,
9177-
reconcilerVersion: "19.0.0-canary-3c5c4140"
9178+
reconcilerVersion: "19.0.0-canary-7a48fce4"
91789179
};
91799180
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
91809181
var hook$jscomp$inline_1239 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<2efa00521669a237ba088981baf581b8>>
10+
* @generated SignedSource<<9206ca0f6781a4c840d6d393f26b3429>>
1111
*/
1212

1313
"use strict";
@@ -3584,6 +3584,7 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
35843584
var instance = workInProgress.stateNode;
35853585
instance.props = newProps;
35863586
instance.state = workInProgress.memoizedState;
3587+
instance.refs = {};
35873588
initializeUpdateQueue(workInProgress);
35883589
var contextType = ctor.contextType;
35893590
"object" === typeof contextType && null !== contextType
@@ -9759,7 +9760,7 @@ var devToolsConfig$jscomp$inline_1101 = {
97599760
throw Error("TestRenderer does not support findFiberByHostInstance()");
97609761
},
97619762
bundleType: 0,
9762-
version: "19.0.0-canary-dec118c3",
9763+
version: "19.0.0-canary-39a6938a",
97639764
rendererPackageName: "react-test-renderer"
97649765
};
97659766
(function (internals) {
@@ -9803,7 +9804,7 @@ var devToolsConfig$jscomp$inline_1101 = {
98039804
scheduleRoot: null,
98049805
setRefreshHandler: null,
98059806
getCurrentFiber: null,
9806-
reconcilerVersion: "19.0.0-canary-dec118c3"
9807+
reconcilerVersion: "19.0.0-canary-39a6938a"
98079808
});
98089809
exports._Scheduler = Scheduler;
98099810
exports.act = act;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<df40c362ab4858d0f1f3b69d7d7eb4ad>>
10+
* @generated SignedSource<<150980e4b77b12c241c9997159b4f67a>>
1111
*/
1212

1313
"use strict";
@@ -26,7 +26,7 @@ if (__DEV__) {
2626
}
2727
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags");
2828

29-
var ReactVersion = "19.0.0-canary-d59b7713";
29+
var ReactVersion = "19.0.0-canary-a13a0c2f";
3030

3131
// ATTENTION
3232
// When adding new symbols to this file,
@@ -299,14 +299,20 @@ if (__DEV__) {
299299

300300
var assign = Object.assign;
301301

302+
var emptyObject = {};
303+
304+
{
305+
Object.freeze(emptyObject);
306+
}
302307
/**
303308
* Base class helpers for the updating state of a component.
304309
*/
305310

306311
function Component(props, context, updater) {
307312
this.props = props;
308-
this.context = context;
309-
this.refs = {}; // We initialize the default updater but the real one gets injected by the
313+
this.context = context; // If a component has string refs, we will assign a different object later.
314+
315+
this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
310316
// renderer.
311317

312318
this.updater = updater || ReactNoopUpdateQueue;
@@ -423,7 +429,7 @@ if (__DEV__) {
423429
this.props = props;
424430
this.context = context; // If a component has string refs, we will assign a different object later.
425431

426-
this.refs = {};
432+
this.refs = emptyObject;
427433
this.updater = updater || ReactNoopUpdateQueue;
428434
}
429435

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<4623f2323ff9fe23a59f41063e37036d>>
10+
* @generated SignedSource<<00252b7815c38ef0d757b44717a43f7d>>
1111
*/
1212

1313
"use strict";
@@ -46,11 +46,12 @@ var ReactNoopUpdateQueue = {
4646
enqueueReplaceState: function () {},
4747
enqueueSetState: function () {}
4848
},
49-
assign = Object.assign;
49+
assign = Object.assign,
50+
emptyObject = {};
5051
function Component(props, context, updater) {
5152
this.props = props;
5253
this.context = context;
53-
this.refs = {};
54+
this.refs = emptyObject;
5455
this.updater = updater || ReactNoopUpdateQueue;
5556
}
5657
Component.prototype.isReactComponent = {};
@@ -73,7 +74,7 @@ ComponentDummy.prototype = Component.prototype;
7374
function PureComponent(props, context, updater) {
7475
this.props = props;
7576
this.context = context;
76-
this.refs = {};
77+
this.refs = emptyObject;
7778
this.updater = updater || ReactNoopUpdateQueue;
7879
}
7980
var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
@@ -678,4 +679,4 @@ exports.useSyncExternalStore = function (
678679
exports.useTransition = function () {
679680
return ReactSharedInternals.H.useTransition();
680681
};
681-
exports.version = "19.0.0-canary-43e619b6";
682+
exports.version = "19.0.0-canary-3277b133";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<6bf80ec383f6cf4c2e8d203cf6a830b0>>
10+
* @generated SignedSource<<9fd3393509037fbe670735ccea6d8cca>>
1111
*/
1212

1313
"use strict";
@@ -50,11 +50,12 @@ var ReactNoopUpdateQueue = {
5050
enqueueReplaceState: function () {},
5151
enqueueSetState: function () {}
5252
},
53-
assign = Object.assign;
53+
assign = Object.assign,
54+
emptyObject = {};
5455
function Component(props, context, updater) {
5556
this.props = props;
5657
this.context = context;
57-
this.refs = {};
58+
this.refs = emptyObject;
5859
this.updater = updater || ReactNoopUpdateQueue;
5960
}
6061
Component.prototype.isReactComponent = {};
@@ -77,7 +78,7 @@ ComponentDummy.prototype = Component.prototype;
7778
function PureComponent(props, context, updater) {
7879
this.props = props;
7980
this.context = context;
80-
this.refs = {};
81+
this.refs = emptyObject;
8182
this.updater = updater || ReactNoopUpdateQueue;
8283
}
8384
var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
@@ -682,7 +683,7 @@ exports.useSyncExternalStore = function (
682683
exports.useTransition = function () {
683684
return ReactSharedInternals.H.useTransition();
684685
};
685-
exports.version = "19.0.0-canary-c3e8564d";
686+
exports.version = "19.0.0-canary-52747c26";
686687
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
687688
"function" ===
688689
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ea24427d16f3ac9b0f3bb45cdc7919ac208130c9
1+
f5ce642deed7c74c5ae5df54ec4340a8d028eac9

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<69452b089b0732ebffeaf4ae565a8ac2>>
10+
* @generated SignedSource<<84d884f07a1d5851f53652012b257860>>
1111
*/
1212

1313
"use strict";
@@ -16131,6 +16131,7 @@ to return true:wantsResponderID| |
1613116131
var instance = workInProgress.stateNode;
1613216132
instance.props = newProps;
1613316133
instance.state = workInProgress.memoizedState;
16134+
instance.refs = {};
1613416135
initializeUpdateQueue(workInProgress);
1613516136
var contextType = ctor.contextType;
1613616137

@@ -30295,7 +30296,7 @@ to return true:wantsResponderID| |
3029530296
return root;
3029630297
}
3029730298

30298-
var ReactVersion = "19.0.0-canary-385c1224";
30299+
var ReactVersion = "19.0.0-canary-adfb7d73";
3029930300

3030030301
/*
3030130302
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<13b0be8da9b49fcd1f29069f699207ea>>
10+
* @generated SignedSource<<d42756695dd6c4c7a24ede54b6a5902a>>
1111
*/
1212

1313
"use strict";
@@ -4995,6 +4995,7 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
49954995
var instance = workInProgress.stateNode;
49964996
instance.props = newProps;
49974997
instance.state = workInProgress.memoizedState;
4998+
instance.refs = {};
49984999
initializeUpdateQueue(workInProgress);
49995000
var contextType = ctor.contextType;
50005001
"object" === typeof contextType && null !== contextType
@@ -10601,7 +10602,7 @@ var roots = new Map(),
1060110602
devToolsConfig$jscomp$inline_1099 = {
1060210603
findFiberByHostInstance: getInstanceFromNode,
1060310604
bundleType: 0,
10604-
version: "19.0.0-canary-7feb98a8",
10605+
version: "19.0.0-canary-7f7baf16",
1060510606
rendererPackageName: "react-native-renderer",
1060610607
rendererConfig: {
1060710608
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -10644,7 +10645,7 @@ var internals$jscomp$inline_1366 = {
1064410645
scheduleRoot: null,
1064510646
setRefreshHandler: null,
1064610647
getCurrentFiber: null,
10647-
reconcilerVersion: "19.0.0-canary-7feb98a8"
10648+
reconcilerVersion: "19.0.0-canary-7f7baf16"
1064810649
};
1064910650
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1065010651
var hook$jscomp$inline_1367 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<dd792dd5b38efe98d74676e597f14301>>
10+
* @generated SignedSource<<64acec7be24561ecbf6d2eaf55e55d0a>>
1111
*/
1212

1313
"use strict";
@@ -5187,6 +5187,7 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
51875187
var instance = workInProgress.stateNode;
51885188
instance.props = newProps;
51895189
instance.state = workInProgress.memoizedState;
5190+
instance.refs = {};
51905191
initializeUpdateQueue(workInProgress);
51915192
var contextType = ctor.contextType;
51925193
"object" === typeof contextType && null !== contextType
@@ -11306,7 +11307,7 @@ var roots = new Map(),
1130611307
devToolsConfig$jscomp$inline_1179 = {
1130711308
findFiberByHostInstance: getInstanceFromNode,
1130811309
bundleType: 0,
11309-
version: "19.0.0-canary-e320aa3b",
11310+
version: "19.0.0-canary-ef6bcf29",
1131011311
rendererPackageName: "react-native-renderer",
1131111312
rendererConfig: {
1131211313
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -11362,7 +11363,7 @@ var roots = new Map(),
1136211363
scheduleRoot: null,
1136311364
setRefreshHandler: null,
1136411365
getCurrentFiber: null,
11365-
reconcilerVersion: "19.0.0-canary-e320aa3b"
11366+
reconcilerVersion: "19.0.0-canary-ef6bcf29"
1136611367
});
1136711368
exports.createPortal = function (children, containerTag) {
1136811369
return createPortal$1(

0 commit comments

Comments
 (0)