From fcc18f83c8de632ee979ffb4c1905e617cec7f36 Mon Sep 17 00:00:00 2001 From: acdlite Date: Wed, 26 Apr 2023 22:24:49 +0000 Subject: [PATCH] Implement experimental_useFormStatus (#26722) This hook reads the status of its ancestor form component, if it exists. ```js const {pending, data, action, method} = useFormStatus(); ``` It can be used to implement a loading indicator, for example. You can think of it as a shortcut for implementing a loading state with the useTransition hook. For now, it's only available in the experimental channel. We'll share docs once its closer to being stable. There are additional APIs that will ship alongside it. Internally it's implemented using startTransition + a context object. That's a good way to think about its behavior, but the actual implementation details may change in the future. Because form elements cannot be nested, the implementation in the reconciler does not bother to keep track of multiple nested "transition providers". So although it's implemented using generic Fiber config methods, it does currently make some assumptions based on React DOM's requirements. DiffTrain build for commit https://github.com/facebook/react/commit/540bab085d571789f4562565eebfd0db9f36345c. --- .../cjs/ReactTestRenderer-dev.js | 31 +++++++--------- .../cjs/ReactTestRenderer-prod.js | 4 +- .../cjs/ReactTestRenderer-profiling.js | 4 +- .../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 | 37 +++++++++---------- .../implementations/ReactFabric-prod.fb.js | 20 +++++----- .../ReactFabric-profiling.fb.js | 20 +++++----- .../ReactNativeRenderer-dev.fb.js | 37 +++++++++---------- .../ReactNativeRenderer-prod.fb.js | 20 +++++----- .../ReactNativeRenderer-profiling.fb.js | 20 +++++----- 13 files changed, 96 insertions(+), 105 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 eb83b055f2..f017146e00 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<<1734297975a5c75886dc8f61c542873e>> + * @generated SignedSource<<147e07431dc4defee6d2e9faf584292a>> */ 'use strict'; @@ -2587,7 +2587,7 @@ function isRootDehydrated(root) { var contextStackCursor = createCursor(null); var contextFiberStackCursor = createCursor(null); -var rootInstanceStackCursor = createCursor(null); +var rootInstanceStackCursor = createCursor(null); // Represents the nearest host transition provider (in React DOM, a
) function requiredContext(c) { { @@ -2641,24 +2641,21 @@ function pushHostContext(fiber) { var context = requiredContext(contextStackCursor.current); var nextContext = getChildHostContext(); // Don't push this Fiber's context unless it's unique. - if (context === nextContext) { - return; - } // Track the context and the Fiber that provided it. - // This enables us to pop only Fibers that provide unique contexts. - - push(contextFiberStackCursor, fiber, fiber); - push(contextStackCursor, nextContext, fiber); + if (context !== nextContext) { + // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + push(contextFiberStackCursor, fiber, fiber); + push(contextStackCursor, nextContext, fiber); + } } function popHostContext(fiber) { - // Do not pop unless this Fiber provided the current context. - // pushHostContext() only pushes Fibers that provide unique contexts. - if (contextFiberStackCursor.current !== fiber) { - return; + if (contextFiberStackCursor.current === fiber) { + // Do not pop unless this Fiber provided the current context. + // pushHostContext() only pushes Fibers that provide unique contexts. + pop(contextStackCursor, fiber); + pop(contextFiberStackCursor, fiber); } - - pop(contextStackCursor, fiber); - pop(contextFiberStackCursor, fiber); } var isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches @@ -23895,7 +23892,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-next-6eadbe0c4-20230425"; +var ReactVersion = "18.3.0-next-540bab085-20230426"; // Might add PROFILE later. 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 22acdc196e..7029bc61fb 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 @@ -8601,7 +8601,7 @@ var devToolsConfig$jscomp$inline_1022 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-next-6eadbe0c4-20230425", + version: "18.3.0-next-540bab085-20230426", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1207 = { @@ -8632,7 +8632,7 @@ var internals$jscomp$inline_1207 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-6eadbe0c4-20230425" + reconcilerVersion: "18.3.0-next-540bab085-20230426" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1208 = __REACT_DEVTOOLS_GLOBAL_HOOK__; 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 f4809a58be..1bcc244cf9 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 @@ -9027,7 +9027,7 @@ var devToolsConfig$jscomp$inline_1064 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-next-6eadbe0c4-20230425", + version: "18.3.0-next-540bab085-20230426", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1248 = { @@ -9058,7 +9058,7 @@ var internals$jscomp$inline_1248 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-6eadbe0c4-20230425" + reconcilerVersion: "18.3.0-next-540bab085-20230426" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1249 = __REACT_DEVTOOLS_GLOBAL_HOOK__; 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 8f9c5ae2b8..b316d9a23c 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-next-6eadbe0c4-20230425"; +var ReactVersion = "18.3.0-next-540bab085-20230426"; // 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 68ad1b6fba..175af26540 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 @@ -639,4 +639,4 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-next-6eadbe0c4-20230425"; +exports.version = "18.3.0-next-540bab085-20230426"; 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 91639cdbea..479e6f7610 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 @@ -642,7 +642,7 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-next-6eadbe0c4-20230425"; +exports.version = "18.3.0-next-540bab085-20230426"; /* 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 c4e513a70b..53c2332945 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 @@ -6eadbe0c4aebf68410bb48147054ee22eec4c20c +540bab085d571789f4562565eebfd0db9f36345c 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 7a5bfafa5b..60a67e2388 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<> + * @generated SignedSource<> */ 'use strict'; @@ -6268,7 +6268,7 @@ function isRootDehydrated(root) { var contextStackCursor = createCursor(null); var contextFiberStackCursor = createCursor(null); -var rootInstanceStackCursor = createCursor(null); +var rootInstanceStackCursor = createCursor(null); // Represents the nearest host transition provider (in React DOM, a ) function requiredContext(c) { { @@ -6322,24 +6322,21 @@ function pushHostContext(fiber) { var context = requiredContext(contextStackCursor.current); var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique. - if (context === nextContext) { - return; - } // Track the context and the Fiber that provided it. - // This enables us to pop only Fibers that provide unique contexts. - - push(contextFiberStackCursor, fiber, fiber); - push(contextStackCursor, nextContext, fiber); + if (context !== nextContext) { + // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + push(contextFiberStackCursor, fiber, fiber); + push(contextStackCursor, nextContext, fiber); + } } function popHostContext(fiber) { - // Do not pop unless this Fiber provided the current context. - // pushHostContext() only pushes Fibers that provide unique contexts. - if (contextFiberStackCursor.current !== fiber) { - return; + if (contextFiberStackCursor.current === fiber) { + // Do not pop unless this Fiber provided the current context. + // pushHostContext() only pushes Fibers that provide unique contexts. + pop(contextStackCursor, fiber); + pop(contextFiberStackCursor, fiber); } - - pop(contextStackCursor, fiber); - pop(contextFiberStackCursor, fiber); } var isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches @@ -11376,11 +11373,11 @@ function useMutableSource(hook, source, getSnapshot, subscribe) { var version = getVersion(source._source); var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const - var _dispatcher$useState = dispatcher.useState(function () { + var _dispatcher$useState2 = dispatcher.useState(function () { return readFromUnsubscribedMutableSource(root, source, getSnapshot); }), - currentSnapshot = _dispatcher$useState[0], - setSnapshot = _dispatcher$useState[1]; + currentSnapshot = _dispatcher$useState2[0], + setSnapshot = _dispatcher$useState2[1]; var snapshot = currentSnapshot; // Grab a handle to the state hook as well. // We use it to clear the pending update queue if we have a new source. @@ -27205,7 +27202,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-next-6eadbe0c4-20230425"; +var ReactVersion = "18.3.0-next-540bab085-20230426"; function createPortal$1( children, 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 80fbb7a128..87db269a1b 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"; @@ -3869,12 +3869,12 @@ function useMutableSource(hook, source, getSnapshot, subscribe) { var getVersion = source._getVersion, version = getVersion(source._source), dispatcher = ReactCurrentDispatcher$1.current, - _dispatcher$useState = dispatcher.useState(function () { + _dispatcher$useState2 = dispatcher.useState(function () { return readFromUnsubscribedMutableSource(root, source, getSnapshot); }), - setSnapshot = _dispatcher$useState[1], - snapshot = _dispatcher$useState[0]; - _dispatcher$useState = workInProgressHook; + setSnapshot = _dispatcher$useState2[1], + snapshot = _dispatcher$useState2[0]; + _dispatcher$useState2 = workInProgressHook; var memoizedState = hook.memoizedState, refs = memoizedState.refs, prevGetSnapshot = refs.getSnapshot, @@ -3927,10 +3927,10 @@ function useMutableSource(hook, source, getSnapshot, subscribe) { }), (hook.dispatch = setSnapshot = dispatchSetState.bind(null, currentlyRenderingFiber$1, hook)), - (_dispatcher$useState.queue = hook), - (_dispatcher$useState.baseQueue = null), + (_dispatcher$useState2.queue = hook), + (_dispatcher$useState2.baseQueue = null), (snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot)), - (_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = + (_dispatcher$useState2.memoizedState = _dispatcher$useState2.baseState = snapshot)); return snapshot; } @@ -9472,7 +9472,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1046 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "18.3.0-next-6eadbe0c4-20230425", + version: "18.3.0-next-540bab085-20230426", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function () { @@ -9514,7 +9514,7 @@ var internals$jscomp$inline_1277 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-6eadbe0c4-20230425" + reconcilerVersion: "18.3.0-next-540bab085-20230426" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1278 = __REACT_DEVTOOLS_GLOBAL_HOOK__; 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 f605d62e74..0ce93f633e 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<<7634b64643555a5e869a82fd5e1dc828>> */ @@ -3999,12 +3999,12 @@ function useMutableSource(hook, source, getSnapshot, subscribe) { var getVersion = source._getVersion, version = getVersion(source._source), dispatcher = ReactCurrentDispatcher$1.current, - _dispatcher$useState = dispatcher.useState(function () { + _dispatcher$useState2 = dispatcher.useState(function () { return readFromUnsubscribedMutableSource(root, source, getSnapshot); }), - setSnapshot = _dispatcher$useState[1], - snapshot = _dispatcher$useState[0]; - _dispatcher$useState = workInProgressHook; + setSnapshot = _dispatcher$useState2[1], + snapshot = _dispatcher$useState2[0]; + _dispatcher$useState2 = workInProgressHook; var memoizedState = hook.memoizedState, refs = memoizedState.refs, prevGetSnapshot = refs.getSnapshot, @@ -4057,10 +4057,10 @@ function useMutableSource(hook, source, getSnapshot, subscribe) { }), (hook.dispatch = setSnapshot = dispatchSetState.bind(null, currentlyRenderingFiber$1, hook)), - (_dispatcher$useState.queue = hook), - (_dispatcher$useState.baseQueue = null), + (_dispatcher$useState2.queue = hook), + (_dispatcher$useState2.baseQueue = null), (snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot)), - (_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = + (_dispatcher$useState2.memoizedState = _dispatcher$useState2.baseState = snapshot)); return snapshot; } @@ -10181,7 +10181,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1124 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "18.3.0-next-6eadbe0c4-20230425", + version: "18.3.0-next-540bab085-20230426", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function () { @@ -10236,7 +10236,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-6eadbe0c4-20230425" + reconcilerVersion: "18.3.0-next-540bab085-20230426" }); exports.createPortal = function (children, containerTag) { return createPortal$1( 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 1af53d4756..6bda000f2e 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<<812e354f66e1eb672accd40316666e44>> + * @generated SignedSource<<22b18563a8650deb3b64f41ff6b2aec7>> */ 'use strict'; @@ -6584,7 +6584,7 @@ function isRootDehydrated(root) { var contextStackCursor = createCursor(null); var contextFiberStackCursor = createCursor(null); -var rootInstanceStackCursor = createCursor(null); +var rootInstanceStackCursor = createCursor(null); // Represents the nearest host transition provider (in React DOM, a ) function requiredContext(c) { { @@ -6638,24 +6638,21 @@ function pushHostContext(fiber) { var context = requiredContext(contextStackCursor.current); var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique. - if (context === nextContext) { - return; - } // Track the context and the Fiber that provided it. - // This enables us to pop only Fibers that provide unique contexts. - - push(contextFiberStackCursor, fiber, fiber); - push(contextStackCursor, nextContext, fiber); + if (context !== nextContext) { + // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + push(contextFiberStackCursor, fiber, fiber); + push(contextStackCursor, nextContext, fiber); + } } function popHostContext(fiber) { - // Do not pop unless this Fiber provided the current context. - // pushHostContext() only pushes Fibers that provide unique contexts. - if (contextFiberStackCursor.current !== fiber) { - return; + if (contextFiberStackCursor.current === fiber) { + // Do not pop unless this Fiber provided the current context. + // pushHostContext() only pushes Fibers that provide unique contexts. + pop(contextStackCursor, fiber); + pop(contextFiberStackCursor, fiber); } - - pop(contextStackCursor, fiber); - pop(contextFiberStackCursor, fiber); } var isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches @@ -11692,11 +11689,11 @@ function useMutableSource(hook, source, getSnapshot, subscribe) { var version = getVersion(source._source); var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const - var _dispatcher$useState = dispatcher.useState(function () { + var _dispatcher$useState2 = dispatcher.useState(function () { return readFromUnsubscribedMutableSource(root, source, getSnapshot); }), - currentSnapshot = _dispatcher$useState[0], - setSnapshot = _dispatcher$useState[1]; + currentSnapshot = _dispatcher$useState2[0], + setSnapshot = _dispatcher$useState2[1]; var snapshot = currentSnapshot; // Grab a handle to the state hook as well. // We use it to clear the pending update queue if we have a new source. @@ -27718,7 +27715,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-next-6eadbe0c4-20230425"; +var ReactVersion = "18.3.0-next-540bab085-20230426"; function createPortal$1( children, 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 7c2a3121c0..2d30c29bbd 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"; @@ -3959,12 +3959,12 @@ function useMutableSource(hook, source, getSnapshot, subscribe) { var getVersion = source._getVersion, version = getVersion(source._source), dispatcher = ReactCurrentDispatcher$1.current, - _dispatcher$useState = dispatcher.useState(function () { + _dispatcher$useState2 = dispatcher.useState(function () { return readFromUnsubscribedMutableSource(root, source, getSnapshot); }), - setSnapshot = _dispatcher$useState[1], - snapshot = _dispatcher$useState[0]; - _dispatcher$useState = workInProgressHook; + setSnapshot = _dispatcher$useState2[1], + snapshot = _dispatcher$useState2[0]; + _dispatcher$useState2 = workInProgressHook; var memoizedState = hook.memoizedState, refs = memoizedState.refs, prevGetSnapshot = refs.getSnapshot, @@ -4017,10 +4017,10 @@ function useMutableSource(hook, source, getSnapshot, subscribe) { }), (hook.dispatch = setSnapshot = dispatchSetState.bind(null, currentlyRenderingFiber$1, hook)), - (_dispatcher$useState.queue = hook), - (_dispatcher$useState.baseQueue = null), + (_dispatcher$useState2.queue = hook), + (_dispatcher$useState2.baseQueue = null), (snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot)), - (_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = + (_dispatcher$useState2.memoizedState = _dispatcher$useState2.baseState = snapshot)); return snapshot; } @@ -9731,7 +9731,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1101 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "18.3.0-next-6eadbe0c4-20230425", + version: "18.3.0-next-540bab085-20230426", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function () { @@ -9773,7 +9773,7 @@ var internals$jscomp$inline_1346 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-6eadbe0c4-20230425" + reconcilerVersion: "18.3.0-next-540bab085-20230426" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1347 = __REACT_DEVTOOLS_GLOBAL_HOOK__; 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 1d2fb16b5e..dbacd2d5cb 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<<96114abf645049ee264d3195be710b11>> */ @@ -4089,12 +4089,12 @@ function useMutableSource(hook, source, getSnapshot, subscribe) { var getVersion = source._getVersion, version = getVersion(source._source), dispatcher = ReactCurrentDispatcher$1.current, - _dispatcher$useState = dispatcher.useState(function () { + _dispatcher$useState2 = dispatcher.useState(function () { return readFromUnsubscribedMutableSource(root, source, getSnapshot); }), - setSnapshot = _dispatcher$useState[1], - snapshot = _dispatcher$useState[0]; - _dispatcher$useState = workInProgressHook; + setSnapshot = _dispatcher$useState2[1], + snapshot = _dispatcher$useState2[0]; + _dispatcher$useState2 = workInProgressHook; var memoizedState = hook.memoizedState, refs = memoizedState.refs, prevGetSnapshot = refs.getSnapshot, @@ -4147,10 +4147,10 @@ function useMutableSource(hook, source, getSnapshot, subscribe) { }), (hook.dispatch = setSnapshot = dispatchSetState.bind(null, currentlyRenderingFiber$1, hook)), - (_dispatcher$useState.queue = hook), - (_dispatcher$useState.baseQueue = null), + (_dispatcher$useState2.queue = hook), + (_dispatcher$useState2.baseQueue = null), (snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot)), - (_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = + (_dispatcher$useState2.memoizedState = _dispatcher$useState2.baseState = snapshot)); return snapshot; } @@ -10440,7 +10440,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1179 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "18.3.0-next-6eadbe0c4-20230425", + version: "18.3.0-next-540bab085-20230426", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function () { @@ -10495,7 +10495,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-6eadbe0c4-20230425" + reconcilerVersion: "18.3.0-next-540bab085-20230426" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) {