Add support for setNativeProps to Fabric (#25737)

Add support for `setNativeProps` in Fabric to make migration to the new
architecture easier. The React Native part of this has already landed in
the core and iOS in
https://github.com/facebook/react-native/commit/1d3fa40c59b234f21f516db85c322ec0ed0311e0.

It is still recommended to move away from `setNativeProps` because the
API will not work with future features.

DiffTrain build for [b14d7fa4b8](https://github.com/facebook/react/commit/b14d7fa4b88dad5f0017d084e462952c700aa2ad)
[View git log for this commit](https://github.com/facebook/react/commits/b14d7fa4b88dad5f0017d084e462952c700aa2ad)
This commit is contained in:
sammy-SC
2022-12-09 14:50:49 +00:00
parent ba16451476
commit a434b3ebf5
35 changed files with 56 additions and 57 deletions
+1 -1
View File
@@ -1 +1 @@
1c7055ddbbdae81224f998e42832d882fde06686
b14d7fa4b88dad5f0017d084e462952c700aa2ad
+1 -1
View File
@@ -1 +1 @@
1c7055ddbbdae81224f998e42832d882fde06686
b14d7fa4b88dad5f0017d084e462952c700aa2ad
+1 -1
View File
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-www-classic-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-classic-b14d7fa4b-20221209";
// ATTENTION
// When adding new symbols to this file,
+1 -1
View File
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-www-modern-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-modern-b14d7fa4b-20221209";
// ATTENTION
// When adding new symbols to this file,
+1 -1
View File
@@ -643,4 +643,4 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-classic-1c7055ddb-20221208";
exports.version = "18.3.0-www-classic-b14d7fa4b-20221209";
+1 -1
View File
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-modern-1c7055ddb-20221208";
exports.version = "18.3.0-www-modern-b14d7fa4b-20221209";
@@ -654,7 +654,7 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-classic-1c7055ddb-20221208";
exports.version = "18.3.0-www-classic-b14d7fa4b-20221209";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -646,7 +646,7 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-modern-1c7055ddb-20221208";
exports.version = "18.3.0-www-modern-b14d7fa4b-20221209";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}
var ReactVersion = "18.3.0-www-classic-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-classic-b14d7fa4b-20221209";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
+1 -1
View File
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}
var ReactVersion = "18.3.0-www-modern-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-modern-b14d7fa4b-20221209";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
@@ -9782,7 +9782,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-classic-1c7055ddb-20221208",
version: "18.3.0-www-classic-b14d7fa4b-20221209",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1336 = {
@@ -9813,7 +9813,7 @@ var internals$jscomp$inline_1336 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1337 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9449,7 +9449,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-modern-1c7055ddb-20221208",
version: "18.3.0-www-modern-b14d7fa4b-20221209",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1327 = {
@@ -9480,7 +9480,7 @@ var internals$jscomp$inline_1327 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1328 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -42530,7 +42530,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-classic-b14d7fa4b-20221209";
function createPortal(
children,
+1 -1
View File
@@ -42254,7 +42254,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-modern-b14d7fa4b-20221209";
function createPortal(
children,
@@ -15537,7 +15537,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1773 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-1c7055ddb-20221208",
version: "18.3.0-www-classic-b14d7fa4b-20221209",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2154 = {
@@ -15567,7 +15567,7 @@ var internals$jscomp$inline_2154 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2155 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15809,4 +15809,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-1c7055ddb-20221208";
exports.version = "18.3.0-next-b14d7fa4b-20221209";
@@ -15098,7 +15098,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1741 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-1c7055ddb-20221208",
version: "18.3.0-www-modern-b14d7fa4b-20221209",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2129 = {
@@ -15129,7 +15129,7 @@ var internals$jscomp$inline_2129 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2130 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15317,4 +15317,4 @@ exports.unstable_flushControlled = function(fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-1c7055ddb-20221208";
exports.version = "18.3.0-next-b14d7fa4b-20221209";
@@ -16308,7 +16308,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1847 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-1c7055ddb-20221208",
version: "18.3.0-www-classic-b14d7fa4b-20221209",
rendererPackageName: "react-dom"
};
(function(internals) {
@@ -16352,7 +16352,7 @@ var devToolsConfig$jscomp$inline_1847 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
});
assign(Internals, {
ReactBrowserEventEmitter: {
@@ -16581,7 +16581,7 @@ exports.unstable_renderSubtreeIntoContainer = function(
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-1c7055ddb-20221208";
exports.version = "18.3.0-next-b14d7fa4b-20221209";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -15859,7 +15859,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1815 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-1c7055ddb-20221208",
version: "18.3.0-www-modern-b14d7fa4b-20221209",
rendererPackageName: "react-dom"
};
(function(internals) {
@@ -15904,7 +15904,7 @@ var devToolsConfig$jscomp$inline_1815 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function(children, container) {
@@ -16079,7 +16079,7 @@ exports.unstable_flushControlled = function(fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-1c7055ddb-20221208";
exports.version = "18.3.0-next-b14d7fa4b-20221209";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -42530,7 +42530,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-classic-b14d7fa4b-20221209";
function createPortal(
children,
@@ -42254,7 +42254,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-modern-b14d7fa4b-20221209";
function createPortal(
children,
@@ -15537,7 +15537,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1773 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-1c7055ddb-20221208",
version: "18.3.0-www-classic-b14d7fa4b-20221209",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2154 = {
@@ -15567,7 +15567,7 @@ var internals$jscomp$inline_2154 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2155 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15809,4 +15809,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-1c7055ddb-20221208";
exports.version = "18.3.0-next-b14d7fa4b-20221209";
@@ -15098,7 +15098,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1741 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-1c7055ddb-20221208",
version: "18.3.0-www-modern-b14d7fa4b-20221209",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2129 = {
@@ -15129,7 +15129,7 @@ var internals$jscomp$inline_2129 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2130 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15317,4 +15317,4 @@ exports.unstable_flushControlled = function(fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-1c7055ddb-20221208";
exports.version = "18.3.0-next-b14d7fa4b-20221209";
@@ -16308,7 +16308,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1847 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-1c7055ddb-20221208",
version: "18.3.0-www-classic-b14d7fa4b-20221209",
rendererPackageName: "react-dom"
};
(function(internals) {
@@ -16352,7 +16352,7 @@ var devToolsConfig$jscomp$inline_1847 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
});
assign(Internals, {
ReactBrowserEventEmitter: {
@@ -16581,7 +16581,7 @@ exports.unstable_renderSubtreeIntoContainer = function(
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-1c7055ddb-20221208";
exports.version = "18.3.0-next-b14d7fa4b-20221209";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -15859,7 +15859,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1815 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-1c7055ddb-20221208",
version: "18.3.0-www-modern-b14d7fa4b-20221209",
rendererPackageName: "react-dom"
};
(function(internals) {
@@ -15904,7 +15904,7 @@ var devToolsConfig$jscomp$inline_1815 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function(children, container) {
@@ -16079,7 +16079,7 @@ exports.unstable_flushControlled = function(fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-1c7055ddb-20221208";
exports.version = "18.3.0-next-b14d7fa4b-20221209";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -18,7 +18,7 @@ if (__DEV__) {
var React = require("react");
var ReactVersion = "18.3.0-www-classic-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-classic-b14d7fa4b-20221209";
// This refers to a WWW module.
var warningWWW = require("warning");
@@ -18,7 +18,7 @@ if (__DEV__) {
var React = require("react");
var ReactVersion = "18.3.0-www-modern-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-modern-b14d7fa4b-20221209";
// This refers to a WWW module.
var warningWWW = require("warning");
@@ -3632,4 +3632,4 @@ exports.renderToString = function(children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "18.3.0-www-classic-1c7055ddb-20221208";
exports.version = "18.3.0-www-classic-b14d7fa4b-20221209";
@@ -3545,4 +3545,4 @@ exports.renderToString = function(children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "18.3.0-www-modern-1c7055ddb-20221208";
exports.version = "18.3.0-www-modern-b14d7fa4b-20221209";
@@ -38807,7 +38807,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-classic-b14d7fa4b-20221209";
function createPortal(
children,
@@ -38369,7 +38369,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-modern-b14d7fa4b-20221209";
function createPortal(
children,
@@ -14445,7 +14445,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1699 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-1c7055ddb-20221208",
version: "18.3.0-www-classic-b14d7fa4b-20221209",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2091 = {
@@ -14475,7 +14475,7 @@ var internals$jscomp$inline_2091 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2092 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -14852,4 +14852,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-1c7055ddb-20221208";
exports.version = "18.3.0-next-b14d7fa4b-20221209";
@@ -13965,7 +13965,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1686 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-1c7055ddb-20221208",
version: "18.3.0-www-modern-b14d7fa4b-20221209",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2082 = {
@@ -13996,7 +13996,7 @@ var internals$jscomp$inline_2082 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-1c7055ddb-20221208"
reconcilerVersion: "18.3.0-next-b14d7fa4b-20221209"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2083 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -14319,4 +14319,4 @@ exports.unstable_flushControlled = function(fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-1c7055ddb-20221208";
exports.version = "18.3.0-next-b14d7fa4b-20221209";
@@ -23781,7 +23781,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-classic-b14d7fa4b-20221209";
var didWarnAboutNestedUpdates;
@@ -23781,7 +23781,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-1c7055ddb-20221208";
var ReactVersion = "18.3.0-www-modern-b14d7fa4b-20221209";
var didWarnAboutNestedUpdates;
-1
View File
@@ -294,7 +294,6 @@
"Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s"
"Warning: ref.measureLayout must be called with a node handle or a ref to a native component."
"Warning: ref.measureLayout must be called with a ref to a native component."
"Warning: setNativeProps is not currently supported in Fabric"
"We should not be hydrating here. This is a bug in React. Please file a bug."
"While creating a %s for href \"%s\" a %s for this same href was found. When preloading a stylesheet the \"as\" prop must be of type \"style\". This most likely ocurred by rendering a preload link with an incorrect \"as\" prop or by calling ReactDOM.preload with an incorrect \"as\" option."
"While creating a %s for href \"%s\" a %s for this same url was found. When preloading a script the \"as\" prop must be of type \"script\". This most likely ocurred by rendering a preload link with an incorrect \"as\" prop or by calling ReactDOM.preload with an incorrect \"as\" option."