Skip to content

Commit

Permalink
Revert "Support writing to this.refs from userspace" (#28877)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kassens committed Apr 19, 2024
1 parent 13710c6 commit 9fbfbd2
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1af14f0d0942bd1e022dac734e776b15>>
* @generated SignedSource<<f80067582f8d263400103116af004cc1>>
*/

"use strict";
Expand Down Expand Up @@ -12589,6 +12589,7 @@ if (__DEV__) {
var instance = workInProgress.stateNode;
instance.props = newProps;
instance.state = workInProgress.memoizedState;
instance.refs = {};
initializeUpdateQueue(workInProgress);
var contextType = ctor.contextType;

Expand Down Expand Up @@ -26672,7 +26673,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-canary-4a670971";
var ReactVersion = "19.0.0-canary-a47ffde4";

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c7247ab9f63052e5a0750fdb7aaf6996>>
* @generated SignedSource<<f3eb1768c908f25292e8f079ec672f53>>
*/

"use strict";
Expand Down Expand Up @@ -3426,6 +3426,7 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
var instance = workInProgress.stateNode;
instance.props = newProps;
instance.state = workInProgress.memoizedState;
instance.refs = {};
initializeUpdateQueue(workInProgress);
var contextType = ctor.contextType;
"object" === typeof contextType && null !== contextType
Expand Down Expand Up @@ -9143,7 +9144,7 @@ var devToolsConfig$jscomp$inline_1019 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-canary-3c5c4140",
version: "19.0.0-canary-7a48fce4",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1238 = {
Expand Down Expand Up @@ -9174,7 +9175,7 @@ var internals$jscomp$inline_1238 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-3c5c4140"
reconcilerVersion: "19.0.0-canary-7a48fce4"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1239 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2efa00521669a237ba088981baf581b8>>
* @generated SignedSource<<9206ca0f6781a4c840d6d393f26b3429>>
*/

"use strict";
Expand Down Expand Up @@ -3584,6 +3584,7 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
var instance = workInProgress.stateNode;
instance.props = newProps;
instance.state = workInProgress.memoizedState;
instance.refs = {};
initializeUpdateQueue(workInProgress);
var contextType = ctor.contextType;
"object" === typeof contextType && null !== contextType
Expand Down Expand Up @@ -9759,7 +9760,7 @@ var devToolsConfig$jscomp$inline_1101 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-canary-dec118c3",
version: "19.0.0-canary-39a6938a",
rendererPackageName: "react-test-renderer"
};
(function (internals) {
Expand Down Expand Up @@ -9803,7 +9804,7 @@ var devToolsConfig$jscomp$inline_1101 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-dec118c3"
reconcilerVersion: "19.0.0-canary-39a6938a"
});
exports._Scheduler = Scheduler;
exports.act = act;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<df40c362ab4858d0f1f3b69d7d7eb4ad>>
* @generated SignedSource<<150980e4b77b12c241c9997159b4f67a>>
*/

"use strict";
Expand All @@ -26,7 +26,7 @@ if (__DEV__) {
}
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags");

var ReactVersion = "19.0.0-canary-d59b7713";
var ReactVersion = "19.0.0-canary-a13a0c2f";

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -299,14 +299,20 @@ if (__DEV__) {

var assign = Object.assign;

var emptyObject = {};

{
Object.freeze(emptyObject);
}
/**
* Base class helpers for the updating state of a component.
*/

function Component(props, context, updater) {
this.props = props;
this.context = context;
this.refs = {}; // We initialize the default updater but the real one gets injected by the
this.context = context; // If a component has string refs, we will assign a different object later.

this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
// renderer.

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

this.refs = {};
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<4623f2323ff9fe23a59f41063e37036d>>
* @generated SignedSource<<00252b7815c38ef0d757b44717a43f7d>>
*/

"use strict";
Expand Down Expand Up @@ -46,11 +46,12 @@ var ReactNoopUpdateQueue = {
enqueueReplaceState: function () {},
enqueueSetState: function () {}
},
assign = Object.assign;
assign = Object.assign,
emptyObject = {};
function Component(props, context, updater) {
this.props = props;
this.context = context;
this.refs = {};
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
Component.prototype.isReactComponent = {};
Expand All @@ -73,7 +74,7 @@ ComponentDummy.prototype = Component.prototype;
function PureComponent(props, context, updater) {
this.props = props;
this.context = context;
this.refs = {};
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
Expand Down Expand Up @@ -678,4 +679,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-canary-43e619b6";
exports.version = "19.0.0-canary-3277b133";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6bf80ec383f6cf4c2e8d203cf6a830b0>>
* @generated SignedSource<<9fd3393509037fbe670735ccea6d8cca>>
*/

"use strict";
Expand Down Expand Up @@ -50,11 +50,12 @@ var ReactNoopUpdateQueue = {
enqueueReplaceState: function () {},
enqueueSetState: function () {}
},
assign = Object.assign;
assign = Object.assign,
emptyObject = {};
function Component(props, context, updater) {
this.props = props;
this.context = context;
this.refs = {};
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
Component.prototype.isReactComponent = {};
Expand All @@ -77,7 +78,7 @@ ComponentDummy.prototype = Component.prototype;
function PureComponent(props, context, updater) {
this.props = props;
this.context = context;
this.refs = {};
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
Expand Down Expand Up @@ -682,7 +683,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-canary-c3e8564d";
exports.version = "19.0.0-canary-52747c26";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ea24427d16f3ac9b0f3bb45cdc7919ac208130c9
f5ce642deed7c74c5ae5df54ec4340a8d028eac9
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<69452b089b0732ebffeaf4ae565a8ac2>>
* @generated SignedSource<<84d884f07a1d5851f53652012b257860>>
*/

"use strict";
Expand Down Expand Up @@ -16131,6 +16131,7 @@ to return true:wantsResponderID| |
var instance = workInProgress.stateNode;
instance.props = newProps;
instance.state = workInProgress.memoizedState;
instance.refs = {};
initializeUpdateQueue(workInProgress);
var contextType = ctor.contextType;

Expand Down Expand Up @@ -30295,7 +30296,7 @@ to return true:wantsResponderID| |
return root;
}

var ReactVersion = "19.0.0-canary-385c1224";
var ReactVersion = "19.0.0-canary-adfb7d73";

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<13b0be8da9b49fcd1f29069f699207ea>>
* @generated SignedSource<<d42756695dd6c4c7a24ede54b6a5902a>>
*/

"use strict";
Expand Down Expand Up @@ -4995,6 +4995,7 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
var instance = workInProgress.stateNode;
instance.props = newProps;
instance.state = workInProgress.memoizedState;
instance.refs = {};
initializeUpdateQueue(workInProgress);
var contextType = ctor.contextType;
"object" === typeof contextType && null !== contextType
Expand Down Expand Up @@ -10601,7 +10602,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1099 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-canary-7feb98a8",
version: "19.0.0-canary-7f7baf16",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -10644,7 +10645,7 @@ var internals$jscomp$inline_1366 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-7feb98a8"
reconcilerVersion: "19.0.0-canary-7f7baf16"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1367 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<dd792dd5b38efe98d74676e597f14301>>
* @generated SignedSource<<64acec7be24561ecbf6d2eaf55e55d0a>>
*/

"use strict";
Expand Down Expand Up @@ -5187,6 +5187,7 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
var instance = workInProgress.stateNode;
instance.props = newProps;
instance.state = workInProgress.memoizedState;
instance.refs = {};
initializeUpdateQueue(workInProgress);
var contextType = ctor.contextType;
"object" === typeof contextType && null !== contextType
Expand Down Expand Up @@ -11306,7 +11307,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1179 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-canary-e320aa3b",
version: "19.0.0-canary-ef6bcf29",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -11362,7 +11363,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-e320aa3b"
reconcilerVersion: "19.0.0-canary-ef6bcf29"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a9c02652daf34108f64b03d290ef9434>>
* @generated SignedSource<<cda44a9b6dde6c0bc692dd0a256b0422>>
*/

"use strict";
Expand Down Expand Up @@ -16402,6 +16402,7 @@ to return true:wantsResponderID| |
var instance = workInProgress.stateNode;
instance.props = newProps;
instance.state = workInProgress.memoizedState;
instance.refs = {};
initializeUpdateQueue(workInProgress);
var contextType = ctor.contextType;

Expand Down Expand Up @@ -30749,7 +30750,7 @@ to return true:wantsResponderID| |
return root;
}

var ReactVersion = "19.0.0-canary-22e6f306";
var ReactVersion = "19.0.0-canary-ad24d706";

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b7840bcf19abcdf73d5013da4e79dca5>>
* @generated SignedSource<<40e33e67d4c6fd0373352fbe892a02dc>>
*/

"use strict";
Expand Down Expand Up @@ -5048,6 +5048,7 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
var instance = workInProgress.stateNode;
instance.props = newProps;
instance.state = workInProgress.memoizedState;
instance.refs = {};
initializeUpdateQueue(workInProgress);
var contextType = ctor.contextType;
"object" === typeof contextType && null !== contextType
Expand Down Expand Up @@ -10823,7 +10824,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1168 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-canary-21664510",
version: "19.0.0-canary-7fc44ecb",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -10866,7 +10867,7 @@ var internals$jscomp$inline_1452 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-21664510"
reconcilerVersion: "19.0.0-canary-7fc44ecb"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1453 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Loading

0 comments on commit 9fbfbd2

Please sign in to comment.