From fc5a146ede592dfe22fe2da63d26be95ba64f5b6 Mon Sep 17 00:00:00 2001 From: acdlite Date: Wed, 13 Sep 2023 22:35:16 +0000 Subject: [PATCH] useFormState: Reuse state from previous form submission (#27321) If a Server Action is passed to useFormState, the action may be submitted before it has hydrated. This will trigger a full page (MPA-style) navigation. We can transfer the form state to the next page by comparing the key path of the hook instance. `ReactServerDOMServer.decodeFormState` is used by the server to extract the form state from the submitted action. This value can then be passed as an option when rendering the new page. It must be passed during both SSR and hydration. ```js const boundAction = await decodeAction(formData, serverManifest); const result = await boundAction(); const formState = decodeFormState(result, formData, serverManifest); // SSR const response = createFromReadableStream(); const ssrStream = await renderToReadableStream(response, { formState }) // Hydration hydrateRoot(container, , { formState }); ``` If the `formState` option is omitted, then the state won't be transferred to the next page. However, it must be passed in both places, or in neither; misconfiguring will result in a hydration mismatch. (The `formState` option is currently prefixed with `experimental_`) DiffTrain build for commit https://github.com/facebook/react/commit/612b2b6601abb844248c384d1e288bb824b180b7. --- .../cjs/ReactTestRenderer-dev.js | 21 ++++++---- .../cjs/ReactTestRenderer-prod.js | 42 ++++++++++--------- .../cjs/ReactTestRenderer-profiling.js | 42 ++++++++++--------- .../RKJSModules/vendor/react/cjs/React-dev.js | 2 +- .../vendor/react/cjs/React-prod.js | 2 +- .../vendor/react/cjs/React-profiling.js | 2 +- .../Libraries/Renderer/REVISION | 2 +- .../implementations/ReactFabric-dev.fb.js | 21 ++++++---- .../implementations/ReactFabric-prod.fb.js | 13 +++--- .../ReactFabric-profiling.fb.js | 13 +++--- .../ReactNativeRenderer-dev.fb.js | 21 ++++++---- .../ReactNativeRenderer-prod.fb.js | 12 +++--- .../ReactNativeRenderer-profiling.fb.js | 12 +++--- 13 files changed, 122 insertions(+), 83 deletions(-) diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js index dfcf16365ce60..a553118a45bb0 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<90d4b49133c0f3de327f45d0812fd8e9>> */ 'use strict'; @@ -23883,7 +23883,8 @@ function FiberRootNode( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ) { this.tag = tag; this.containerInfo = containerInfo; @@ -23917,6 +23918,7 @@ function FiberRootNode( this.pooledCacheLanes = NoLanes; } + this.formState = formState; this.incompleteTransitions = new Map(); { @@ -23950,7 +23952,8 @@ function createFiberRoot( // single type, like a DynamicHostConfig that is defined by the renderer. identifierPrefix, onRecoverableError, - transitionCallbacks + transitionCallbacks, + formState ) { // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions var root = new FiberRootNode( @@ -23958,7 +23961,8 @@ function createFiberRoot( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ); // stateNode is any. @@ -23994,7 +23998,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-canary-e5205658f-20230913"; +var ReactVersion = "18.3.0-canary-612b2b660-20230913"; // Might add PROFILE later. @@ -24044,7 +24048,9 @@ function createContainer( isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, - onRecoverableError + onRecoverableError, + transitionCallbacks, + null ); } function updateContainer(element, container, parentComponent, callback) { @@ -24911,7 +24917,8 @@ function create(element, options) { isStrictMode, concurrentUpdatesByDefault, "", - onRecoverableError + onRecoverableError, + null ); if (root == null) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js index 3d2a0b211307e..a6f063c265128 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<5361a5f040398d7d166b0f13b30a010c>> */ "use strict"; @@ -8179,7 +8179,8 @@ function FiberRootNode( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ) { this.tag = tag; this.containerInfo = containerInfo; @@ -8212,6 +8213,7 @@ function FiberRootNode( this.onRecoverableError = onRecoverableError; this.pooledCache = null; this.pooledCacheLanes = 0; + this.formState = formState; this.incompleteTransitions = new Map(); } function createContainer( @@ -8228,7 +8230,8 @@ function createContainer( tag, !1, identifierPrefix, - onRecoverableError + onRecoverableError, + null ); 1 === tag ? ((tag = 1), @@ -8612,19 +8615,19 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_1027 = { +var devToolsConfig$jscomp$inline_1028 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-canary-e5205658f-20230913", + version: "18.3.0-canary-612b2b660-20230913", rendererPackageName: "react-test-renderer" }; -var internals$jscomp$inline_1226 = { - bundleType: devToolsConfig$jscomp$inline_1027.bundleType, - version: devToolsConfig$jscomp$inline_1027.version, - rendererPackageName: devToolsConfig$jscomp$inline_1027.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1027.rendererConfig, +var internals$jscomp$inline_1227 = { + bundleType: devToolsConfig$jscomp$inline_1028.bundleType, + version: devToolsConfig$jscomp$inline_1028.version, + rendererPackageName: devToolsConfig$jscomp$inline_1028.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1028.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -8641,26 +8644,26 @@ var internals$jscomp$inline_1226 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1027.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1028.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-e5205658f-20230913" + reconcilerVersion: "18.3.0-canary-612b2b660-20230913" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1227 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1228 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1227.isDisabled && - hook$jscomp$inline_1227.supportsFiber + !hook$jscomp$inline_1228.isDisabled && + hook$jscomp$inline_1228.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1227.inject( - internals$jscomp$inline_1226 + (rendererID = hook$jscomp$inline_1228.inject( + internals$jscomp$inline_1227 )), - (injectedHook = hook$jscomp$inline_1227); + (injectedHook = hook$jscomp$inline_1228); } catch (err) {} } exports._Scheduler = Scheduler; @@ -8691,7 +8694,8 @@ exports.create = function (element, options) { isStrictMode, concurrentUpdatesByDefault, "", - onRecoverableError + onRecoverableError, + null ); if (null == root) throw Error("something went wrong"); updateContainer(element, root, null, null); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 185e5407050dd..c4471fc6e51a9 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<486546c05387fd5f0f9d0c9c12aa9b75>> */ "use strict"; @@ -8603,7 +8603,8 @@ function FiberRootNode( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ) { this.tag = tag; this.containerInfo = containerInfo; @@ -8636,6 +8637,7 @@ function FiberRootNode( this.onRecoverableError = onRecoverableError; this.pooledCache = null; this.pooledCacheLanes = 0; + this.formState = formState; this.incompleteTransitions = new Map(); this.passiveEffectDuration = this.effectDuration = 0; } @@ -8653,7 +8655,8 @@ function createContainer( tag, !1, identifierPrefix, - onRecoverableError + onRecoverableError, + null ); 1 === tag ? ((tag = 1), @@ -9038,19 +9041,19 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_1069 = { +var devToolsConfig$jscomp$inline_1070 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-canary-e5205658f-20230913", + version: "18.3.0-canary-612b2b660-20230913", rendererPackageName: "react-test-renderer" }; -var internals$jscomp$inline_1267 = { - bundleType: devToolsConfig$jscomp$inline_1069.bundleType, - version: devToolsConfig$jscomp$inline_1069.version, - rendererPackageName: devToolsConfig$jscomp$inline_1069.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1069.rendererConfig, +var internals$jscomp$inline_1268 = { + bundleType: devToolsConfig$jscomp$inline_1070.bundleType, + version: devToolsConfig$jscomp$inline_1070.version, + rendererPackageName: devToolsConfig$jscomp$inline_1070.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1070.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9067,26 +9070,26 @@ var internals$jscomp$inline_1267 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1069.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1070.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-e5205658f-20230913" + reconcilerVersion: "18.3.0-canary-612b2b660-20230913" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1268 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1269 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1268.isDisabled && - hook$jscomp$inline_1268.supportsFiber + !hook$jscomp$inline_1269.isDisabled && + hook$jscomp$inline_1269.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1268.inject( - internals$jscomp$inline_1267 + (rendererID = hook$jscomp$inline_1269.inject( + internals$jscomp$inline_1268 )), - (injectedHook = hook$jscomp$inline_1268); + (injectedHook = hook$jscomp$inline_1269); } catch (err) {} } exports._Scheduler = Scheduler; @@ -9117,7 +9120,8 @@ exports.create = function (element, options) { isStrictMode, concurrentUpdatesByDefault, "", - onRecoverableError + onRecoverableError, + null ); if (null == root) throw Error("something went wrong"); updateContainer(element, root, null, null); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js index 3408dd08dcf10..f6e58a11c5f46 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-canary-e5205658f-20230913"; +var ReactVersion = "18.3.0-canary-612b2b660-20230913"; // ATTENTION // When adding new symbols to this file, diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js index 845b28fa418a7..6313a979fd037 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js @@ -616,4 +616,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-canary-e5205658f-20230913"; +exports.version = "18.3.0-canary-612b2b660-20230913"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js index cb74b95786a58..4c35303f7de3f 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js @@ -619,7 +619,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-canary-e5205658f-20230913"; +exports.version = "18.3.0-canary-612b2b660-20230913"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index c9f13bb82a5bf..ccf919c9f4922 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -e5205658f40ad181279857dbb66e36b8ebcd8c0e +612b2b6601abb844248c384d1e288bb824b180b7 diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index 38e233774a10f..67f055e1c906c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<588595e62718a973abbe3ee5129ccaa8>> + * @generated SignedSource<<01008a8950368c139ee32158a8728c5d>> */ 'use strict'; @@ -26929,7 +26929,8 @@ function FiberRootNode( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ) { this.tag = tag; this.containerInfo = containerInfo; @@ -26958,6 +26959,7 @@ function FiberRootNode( this.identifierPrefix = identifierPrefix; this.onRecoverableError = onRecoverableError; + this.formState = formState; this.incompleteTransitions = new Map(); { @@ -27000,7 +27002,8 @@ function createFiberRoot( // single type, like a DynamicHostConfig that is defined by the renderer. identifierPrefix, onRecoverableError, - transitionCallbacks + transitionCallbacks, + formState ) { // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions var root = new FiberRootNode( @@ -27008,7 +27011,8 @@ function createFiberRoot( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ); // stateNode is any. @@ -27033,7 +27037,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-canary-8ee3c01f"; +var ReactVersion = "18.3.0-canary-f73f8a34"; function createPortal$1( children, @@ -27177,7 +27181,9 @@ function createContainer( isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, - onRecoverableError + onRecoverableError, + transitionCallbacks, + null ); } function updateContainer(element, container, parentComponent, callback) { @@ -28005,7 +28011,8 @@ function render(element, containerTag, callback, concurrentRoot) { false, null, "", - onRecoverableError + onRecoverableError, + null ); roots.set(containerTag, root); } diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index f536bbb6b7a1c..40e86b3b5b98f 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -9172,7 +9172,8 @@ function FiberRootNode( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ) { this.tag = tag; this.containerInfo = containerInfo; @@ -9203,6 +9204,7 @@ function FiberRootNode( this.hiddenUpdates = createLaneMap(null); this.identifierPrefix = identifierPrefix; this.onRecoverableError = onRecoverableError; + this.formState = formState; this.incompleteTransitions = new Map(); } function createPortal$1(children, containerInfo, implementation) { @@ -9423,7 +9425,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1038 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "18.3.0-canary-f14942e6", + version: "18.3.0-canary-af8a5ec1", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -9466,7 +9468,7 @@ var internals$jscomp$inline_1280 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-f14942e6" + reconcilerVersion: "18.3.0-canary-af8a5ec1" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1281 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -9545,7 +9547,8 @@ exports.render = function (element, containerTag, callback, concurrentRoot) { root, !1, "", - onRecoverableError + onRecoverableError, + null )), (root = createFiber(3, null, null, 1 === root ? 1 : 0)), (concurrentRoot.current = root), diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index c0036a0ae6059..c8ce5ff219558 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<6b16278436dd259e22a3d49533f17505>> */ @@ -9873,7 +9873,8 @@ function FiberRootNode( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ) { this.tag = tag; this.containerInfo = containerInfo; @@ -9904,6 +9905,7 @@ function FiberRootNode( this.hiddenUpdates = createLaneMap(null); this.identifierPrefix = identifierPrefix; this.onRecoverableError = onRecoverableError; + this.formState = formState; this.incompleteTransitions = new Map(); this.passiveEffectDuration = this.effectDuration = 0; this.memoizedUpdaters = new Set(); @@ -10131,7 +10133,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1116 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "18.3.0-canary-1e44ed5a", + version: "18.3.0-canary-db5e081b", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10187,7 +10189,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-1e44ed5a" + reconcilerVersion: "18.3.0-canary-db5e081b" }); exports.createPortal = function (children, containerTag) { return createPortal$1( @@ -10253,7 +10255,8 @@ exports.render = function (element, containerTag, callback, concurrentRoot) { root, !1, "", - onRecoverableError + onRecoverableError, + null )), (root = 1 === root ? 1 : 0), isDevToolsPresent && (root |= 2), diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index f4aabf4477baf..5faea909a3347 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<3e32b2083b138b74caf4e294d5f1d5d6>> + * @generated SignedSource<> */ 'use strict'; @@ -27443,7 +27443,8 @@ function FiberRootNode( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ) { this.tag = tag; this.containerInfo = containerInfo; @@ -27472,6 +27473,7 @@ function FiberRootNode( this.identifierPrefix = identifierPrefix; this.onRecoverableError = onRecoverableError; + this.formState = formState; this.incompleteTransitions = new Map(); { @@ -27514,7 +27516,8 @@ function createFiberRoot( // single type, like a DynamicHostConfig that is defined by the renderer. identifierPrefix, onRecoverableError, - transitionCallbacks + transitionCallbacks, + formState ) { // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions var root = new FiberRootNode( @@ -27522,7 +27525,8 @@ function createFiberRoot( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ); // stateNode is any. @@ -27547,7 +27551,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-canary-848197bb"; +var ReactVersion = "18.3.0-canary-28a7f6a0"; function createPortal$1( children, @@ -27691,7 +27695,9 @@ function createContainer( isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, - onRecoverableError + onRecoverableError, + transitionCallbacks, + null ); } function updateContainer(element, container, parentComponent, callback) { @@ -28513,7 +28519,8 @@ function render(element, containerTag, callback) { false, null, "", - onRecoverableError + onRecoverableError, + null ); roots.set(containerTag, root); } diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 687be8e79d5c4..2c66506d84ef0 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -9421,7 +9421,8 @@ function FiberRootNode( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ) { this.tag = tag; this.containerInfo = containerInfo; @@ -9452,6 +9453,7 @@ function FiberRootNode( this.hiddenUpdates = createLaneMap(null); this.identifierPrefix = identifierPrefix; this.onRecoverableError = onRecoverableError; + this.formState = formState; this.incompleteTransitions = new Map(); } function createPortal$1(children, containerInfo, implementation) { @@ -9679,7 +9681,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1093 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "18.3.0-canary-ca1379dc", + version: "18.3.0-canary-38805935", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -9722,7 +9724,7 @@ var internals$jscomp$inline_1349 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-ca1379dc" + reconcilerVersion: "18.3.0-canary-38805935" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1350 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -9781,7 +9783,7 @@ exports.getInspectorDataForInstance = getInspectorDataForInstance; exports.render = function (element, containerTag, callback) { var root = roots.get(containerTag); if (!root) { - root = new FiberRootNode(containerTag, 0, !1, "", onRecoverableError); + root = new FiberRootNode(containerTag, 0, !1, "", onRecoverableError, null); var JSCompiler_inline_result = createFiber(3, null, null, 0); root.current = JSCompiler_inline_result; JSCompiler_inline_result.stateNode = root; diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index 831cf117b319e..19090d319d6a4 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<7d829b6bea14b03ca3f0800f7f1380e0>> */ @@ -10122,7 +10122,8 @@ function FiberRootNode( tag, hydrate, identifierPrefix, - onRecoverableError + onRecoverableError, + formState ) { this.tag = tag; this.containerInfo = containerInfo; @@ -10153,6 +10154,7 @@ function FiberRootNode( this.hiddenUpdates = createLaneMap(null); this.identifierPrefix = identifierPrefix; this.onRecoverableError = onRecoverableError; + this.formState = formState; this.incompleteTransitions = new Map(); this.passiveEffectDuration = this.effectDuration = 0; this.memoizedUpdaters = new Set(); @@ -10387,7 +10389,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1171 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "18.3.0-canary-6edff5a8", + version: "18.3.0-canary-8bb18aca", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10443,7 +10445,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-6edff5a8" + reconcilerVersion: "18.3.0-canary-8bb18aca" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) { @@ -10489,7 +10491,7 @@ exports.getInspectorDataForInstance = getInspectorDataForInstance; exports.render = function (element, containerTag, callback) { var root = roots.get(containerTag); if (!root) { - root = new FiberRootNode(containerTag, 0, !1, "", onRecoverableError); + root = new FiberRootNode(containerTag, 0, !1, "", onRecoverableError, null); var JSCompiler_inline_result = 0; isDevToolsPresent && (JSCompiler_inline_result |= 2); JSCompiler_inline_result = createFiber(