Skip to content

Commit 7accc50

Browse files
Sync React 19.1.2 into React Native
1 parent d32eff8 commit 7accc50

20 files changed

Lines changed: 255 additions & 201 deletions

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@react-native/metro-babel-transformer": "0.81.5",
5656
"@react-native/metro-config": "0.81.5",
5757
"@tsconfig/node22": "22.0.2",
58-
"@types/react": "^19.1.0",
58+
"@types/react": "^19.1.2",
5959
"@typescript-eslint/parser": "^7.1.1",
6060
"ansi-styles": "^4.2.1",
6161
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
@@ -98,8 +98,8 @@
9898
"nullthrows": "^1.1.1",
9999
"prettier": "2.8.8",
100100
"prettier-plugin-hermes-parser": "0.29.1",
101-
"react": "19.1.0",
102-
"react-test-renderer": "19.1.0",
101+
"react": "19.1.2",
102+
"react-test-renderer": "19.1.2",
103103
"rimraf": "^3.0.2",
104104
"shelljs": "^0.8.5",
105105
"signedsource": "^1.0.0",
@@ -111,6 +111,6 @@
111111
},
112112
"resolutions": {
113113
"eslint-plugin-react-hooks": "6.1.0-canary-12bc60f5-20250613",
114-
"react-is": "19.1.0"
114+
"react-is": "19.1.2"
115115
}
116116
}

packages/new-app-screen/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
],
2121
"dependencies": {},
2222
"peerDependencies": {
23-
"@types/react": "^19.1.0",
23+
"@types/react": "^19.1.2",
2424
"react": "*",
2525
"react-native": "*"
2626
},

packages/react-native-popup-menu-android/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@react-native/codegen": "0.81.5"
2525
},
2626
"peerDependencies": {
27-
"@types/react": "^19.1.0",
27+
"@types/react": "^19.1.2",
2828
"react": "*",
2929
"react-native": "*"
3030
},

packages/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<6b3694149dd8856f0c741d3d94e05646>>
11-
*
12-
* This file was sync'd from the facebook/react repository.
1310
*/
1411

1512
"use strict";
@@ -410,7 +407,7 @@ __DEV__ &&
410407
prevPrepareStackTrace = error.indexOf("\n");
411408
-1 !== prevPrepareStackTrace &&
412409
(error = error.slice(prevPrepareStackTrace + 1));
413-
prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
410+
prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
414411
-1 !== prevPrepareStackTrace &&
415412
(prevPrepareStackTrace = error.lastIndexOf(
416413
"\n",
@@ -8990,12 +8987,10 @@ __DEV__ &&
89908987
function updateHostContainer(current, workInProgress) {
89918988
if (doesRequireClone(current, workInProgress)) {
89928989
current = workInProgress.stateNode;
8993-
var container = current.containerInfo,
8994-
newChildSet = createChildNodeSet();
8990+
var newChildSet = createChildNodeSet();
89958991
appendAllChildrenToContainer(newChildSet, workInProgress, !1, !1);
89968992
current.pendingChildren = newChildSet;
89978993
workInProgress.flags |= 4;
8998-
completeRoot(container.containerTag, newChildSet);
89998994
}
90008995
}
90018996
function scheduleRetryEffect(workInProgress, retryQueue) {
@@ -13805,7 +13800,9 @@ __DEV__ &&
1380513800
canonical: instance.canonical
1380613801
};
1380713802
}
13808-
function replaceContainerChildren() {}
13803+
function replaceContainerChildren(container, newChildren) {
13804+
completeRoot(container.containerTag, newChildren);
13805+
}
1380913806
function nativeOnUncaughtError(error, errorInfo) {
1381013807
!1 !==
1381113808
ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog({
@@ -15880,7 +15877,7 @@ __DEV__ &&
1588015877
}
1588115878
};
1588215879
var callComponent = {
15883-
"react-stack-bottom-frame": function (Component, props, secondArg) {
15880+
react_stack_bottom_frame: function (Component, props, secondArg) {
1588415881
var wasRendering = isRendering;
1588515882
isRendering = !0;
1588615883
try {
@@ -15891,9 +15888,9 @@ __DEV__ &&
1589115888
}
1589215889
},
1589315890
callComponentInDEV =
15894-
callComponent["react-stack-bottom-frame"].bind(callComponent),
15891+
callComponent.react_stack_bottom_frame.bind(callComponent),
1589515892
callRender = {
15896-
"react-stack-bottom-frame": function (instance) {
15893+
react_stack_bottom_frame: function (instance) {
1589715894
var wasRendering = isRendering;
1589815895
isRendering = !0;
1589915896
try {
@@ -15903,21 +15900,22 @@ __DEV__ &&
1590315900
}
1590415901
}
1590515902
},
15906-
callRenderInDEV = callRender["react-stack-bottom-frame"].bind(callRender),
15903+
callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender),
1590715904
callComponentDidMount = {
15908-
"react-stack-bottom-frame": function (finishedWork, instance) {
15905+
react_stack_bottom_frame: function (finishedWork, instance) {
1590915906
try {
1591015907
instance.componentDidMount();
1591115908
} catch (error) {
1591215909
captureCommitPhaseError(finishedWork, finishedWork.return, error);
1591315910
}
1591415911
}
1591515912
},
15916-
callComponentDidMountInDEV = callComponentDidMount[
15917-
"react-stack-bottom-frame"
15918-
].bind(callComponentDidMount),
15913+
callComponentDidMountInDEV =
15914+
callComponentDidMount.react_stack_bottom_frame.bind(
15915+
callComponentDidMount
15916+
),
1591915917
callComponentDidUpdate = {
15920-
"react-stack-bottom-frame": function (
15918+
react_stack_bottom_frame: function (
1592115919
finishedWork,
1592215920
instance,
1592315921
prevProps,
@@ -15931,22 +15929,24 @@ __DEV__ &&
1593115929
}
1593215930
}
1593315931
},
15934-
callComponentDidUpdateInDEV = callComponentDidUpdate[
15935-
"react-stack-bottom-frame"
15936-
].bind(callComponentDidUpdate),
15932+
callComponentDidUpdateInDEV =
15933+
callComponentDidUpdate.react_stack_bottom_frame.bind(
15934+
callComponentDidUpdate
15935+
),
1593715936
callComponentDidCatch = {
15938-
"react-stack-bottom-frame": function (instance, errorInfo) {
15937+
react_stack_bottom_frame: function (instance, errorInfo) {
1593915938
var stack = errorInfo.stack;
1594015939
instance.componentDidCatch(errorInfo.value, {
1594115940
componentStack: null !== stack ? stack : ""
1594215941
});
1594315942
}
1594415943
},
15945-
callComponentDidCatchInDEV = callComponentDidCatch[
15946-
"react-stack-bottom-frame"
15947-
].bind(callComponentDidCatch),
15944+
callComponentDidCatchInDEV =
15945+
callComponentDidCatch.react_stack_bottom_frame.bind(
15946+
callComponentDidCatch
15947+
),
1594815948
callComponentWillUnmount = {
15949-
"react-stack-bottom-frame": function (
15949+
react_stack_bottom_frame: function (
1595015950
current,
1595115951
nearestMountedAncestor,
1595215952
instance
@@ -15958,11 +15958,12 @@ __DEV__ &&
1595815958
}
1595915959
}
1596015960
},
15961-
callComponentWillUnmountInDEV = callComponentWillUnmount[
15962-
"react-stack-bottom-frame"
15963-
].bind(callComponentWillUnmount),
15961+
callComponentWillUnmountInDEV =
15962+
callComponentWillUnmount.react_stack_bottom_frame.bind(
15963+
callComponentWillUnmount
15964+
),
1596415965
callCreate = {
15965-
"react-stack-bottom-frame": function (effect) {
15966+
react_stack_bottom_frame: function (effect) {
1596615967
null != effect.resourceKind &&
1596715968
console.error(
1596815969
"Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",
@@ -15974,9 +15975,9 @@ __DEV__ &&
1597415975
return (effect.destroy = create);
1597515976
}
1597615977
},
15977-
callCreateInDEV = callCreate["react-stack-bottom-frame"].bind(callCreate),
15978+
callCreateInDEV = callCreate.react_stack_bottom_frame.bind(callCreate),
1597815979
callDestroy = {
15979-
"react-stack-bottom-frame": function (
15980+
react_stack_bottom_frame: function (
1598015981
current,
1598115982
nearestMountedAncestor,
1598215983
destroy
@@ -15988,16 +15989,15 @@ __DEV__ &&
1598815989
}
1598915990
}
1599015991
},
15991-
callDestroyInDEV =
15992-
callDestroy["react-stack-bottom-frame"].bind(callDestroy),
15992+
callDestroyInDEV = callDestroy.react_stack_bottom_frame.bind(callDestroy),
1599315993
callLazyInit = {
15994-
"react-stack-bottom-frame": function (lazy) {
15994+
react_stack_bottom_frame: function (lazy) {
1599515995
var init = lazy._init;
1599615996
return init(lazy._payload);
1599715997
}
1599815998
},
1599915999
callLazyInitInDEV =
16000-
callLazyInit["react-stack-bottom-frame"].bind(callLazyInit),
16000+
callLazyInit.react_stack_bottom_frame.bind(callLazyInit),
1600116001
thenableState = null,
1600216002
thenableIndexCounter = 0,
1600316003
currentDebugInfo = null,
@@ -16616,10 +16616,10 @@ __DEV__ &&
1661616616
(function () {
1661716617
var internals = {
1661816618
bundleType: 1,
16619-
version: "19.1.0",
16619+
version: "19.1.2",
1662016620
rendererPackageName: "react-native-renderer",
1662116621
currentDispatcherRef: ReactSharedInternals,
16622-
reconcilerVersion: "19.1.0"
16622+
reconcilerVersion: "19.1.2"
1662316623
};
1662416624
null !== extraDevToolsConfig &&
1662516625
(internals.rendererConfig = extraDevToolsConfig);

packages/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<7430b56dac3186eca669ae53bbf1f23d>>
11-
*
12-
* This file was sync'd from the facebook/react repository.
1310
*/
1411

1512
"use strict";
@@ -7013,12 +7010,10 @@ function appendAllChildrenToContainer(
70137010
function updateHostContainer(current, workInProgress) {
70147011
if (doesRequireClone(current, workInProgress)) {
70157012
current = workInProgress.stateNode;
7016-
var container = current.containerInfo,
7017-
newChildSet = createChildNodeSet();
7013+
var newChildSet = createChildNodeSet();
70187014
appendAllChildrenToContainer(newChildSet, workInProgress, !1, !1);
70197015
current.pendingChildren = newChildSet;
70207016
workInProgress.flags |= 4;
7021-
completeRoot(container.containerTag, newChildSet);
70227017
}
70237018
}
70247019
function scheduleRetryEffect(workInProgress, retryQueue) {
@@ -7679,6 +7674,18 @@ function commitHostMount(finishedWork) {
76797674
captureCommitPhaseError(finishedWork, finishedWork.return, error);
76807675
}
76817676
}
7677+
function commitHostPortalContainerChildren(
7678+
portal,
7679+
finishedWork,
7680+
pendingChildren
7681+
) {
7682+
portal = portal.containerInfo;
7683+
try {
7684+
completeRoot(portal.containerTag, pendingChildren);
7685+
} catch (error) {
7686+
captureCommitPhaseError(finishedWork, finishedWork.return, error);
7687+
}
7688+
}
76827689
var offscreenSubtreeIsHidden = !1,
76837690
offscreenSubtreeWasHidden = !1,
76847691
PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
@@ -7917,7 +7924,11 @@ function commitDeletionEffectsOnFiber(
79177924
case 18:
79187925
break;
79197926
case 4:
7920-
createChildNodeSet();
7927+
commitHostPortalContainerChildren(
7928+
deletedFiber.stateNode,
7929+
deletedFiber,
7930+
createChildNodeSet()
7931+
);
79217932
recursivelyTraverseDeletionEffects(
79227933
finishedRoot,
79237934
nearestMountedAncestor,
@@ -8062,9 +8073,9 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
80628073
null !== finishedWork &&
80638074
((flags = finishedWork.callbacks),
80648075
null !== flags &&
8065-
((current = finishedWork.shared.hiddenCallbacks),
8076+
((root = finishedWork.shared.hiddenCallbacks),
80668077
(finishedWork.shared.hiddenCallbacks =
8067-
null === current ? flags : current.concat(flags)))));
8078+
null === root ? flags : root.concat(flags)))));
80688079
break;
80698080
case 26:
80708081
case 27:
@@ -8085,10 +8096,25 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
80858096
case 3:
80868097
recursivelyTraverseMutationEffects(root, finishedWork);
80878098
commitReconciliationEffects(finishedWork);
8099+
if (flags & 4) {
8100+
flags = root.containerInfo;
8101+
root = root.pendingChildren;
8102+
try {
8103+
completeRoot(flags.containerTag, root);
8104+
} catch (error) {
8105+
captureCommitPhaseError(finishedWork, finishedWork.return, error);
8106+
}
8107+
}
80888108
break;
80898109
case 4:
80908110
recursivelyTraverseMutationEffects(root, finishedWork);
80918111
commitReconciliationEffects(finishedWork);
8112+
flags & 4 &&
8113+
commitHostPortalContainerChildren(
8114+
finishedWork.stateNode,
8115+
finishedWork,
8116+
finishedWork.stateNode.pendingChildren
8117+
);
80928118
break;
80938119
case 12:
80948120
recursivelyTraverseMutationEffects(root, finishedWork);
@@ -8098,9 +8124,9 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
80988124
recursivelyTraverseMutationEffects(root, finishedWork);
80998125
commitReconciliationEffects(finishedWork);
81008126
finishedWork.child.flags & 8192 &&
8101-
((current = null !== current && null !== current.memoizedState),
8127+
((root = null !== current && null !== current.memoizedState),
81028128
null === finishedWork.memoizedState ||
8103-
current ||
8129+
root ||
81048130
(globalMostRecentFallbackTime = now()));
81058131
flags & 4 &&
81068132
((flags = finishedWork.updateQueue),
@@ -8136,10 +8162,10 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
81368162
flags & 4 &&
81378163
((flags = finishedWork.updateQueue),
81388164
null !== flags &&
8139-
((current = flags.retryQueue),
8140-
null !== current &&
8165+
((root = flags.retryQueue),
8166+
null !== root &&
81418167
((flags.retryQueue = null),
8142-
attachSuspenseRetryListeners(finishedWork, current))));
8168+
attachSuspenseRetryListeners(finishedWork, root))));
81438169
break;
81448170
case 19:
81458171
recursivelyTraverseMutationEffects(root, finishedWork);
@@ -10415,26 +10441,26 @@ batchedUpdatesImpl = function (fn, a) {
1041510441
}
1041610442
};
1041710443
var roots = new Map(),
10418-
internals$jscomp$inline_1206 = {
10444+
internals$jscomp$inline_1203 = {
1041910445
bundleType: 0,
10420-
version: "19.1.0",
10446+
version: "19.1.2",
1042110447
rendererPackageName: "react-native-renderer",
1042210448
currentDispatcherRef: ReactSharedInternals,
10423-
reconcilerVersion: "19.1.0"
10449+
reconcilerVersion: "19.1.2"
1042410450
};
1042510451
null !== extraDevToolsConfig &&
10426-
(internals$jscomp$inline_1206.rendererConfig = extraDevToolsConfig);
10452+
(internals$jscomp$inline_1203.rendererConfig = extraDevToolsConfig);
1042710453
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
10428-
var hook$jscomp$inline_1519 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
10454+
var hook$jscomp$inline_1515 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1042910455
if (
10430-
!hook$jscomp$inline_1519.isDisabled &&
10431-
hook$jscomp$inline_1519.supportsFiber
10456+
!hook$jscomp$inline_1515.isDisabled &&
10457+
hook$jscomp$inline_1515.supportsFiber
1043210458
)
1043310459
try {
10434-
(rendererID = hook$jscomp$inline_1519.inject(
10435-
internals$jscomp$inline_1206
10460+
(rendererID = hook$jscomp$inline_1515.inject(
10461+
internals$jscomp$inline_1203
1043610462
)),
10437-
(injectedHook = hook$jscomp$inline_1519);
10463+
(injectedHook = hook$jscomp$inline_1515);
1043810464
} catch (err) {}
1043910465
}
1044010466
exports.createPortal = function (children, containerTag) {

0 commit comments

Comments
 (0)