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 bc4b5c9ea1711..e23f78a77de97 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<> */ "use strict"; @@ -9917,14 +9917,14 @@ if (__DEV__) { function mountDeferredValue(value, initialValue) { var hook = mountWorkInProgressHook(); - return mountDeferredValueImpl(hook, value); + return mountDeferredValueImpl(hook, value, initialValue); } function updateDeferredValue(value, initialValue) { var hook = updateWorkInProgressHook(); var resolvedCurrentHook = currentHook; var prevValue = resolvedCurrentHook.memoizedState; - return updateDeferredValueImpl(hook, prevValue, value); + return updateDeferredValueImpl(hook, prevValue, value, initialValue); } function rerenderDeferredValue(value, initialValue) { @@ -9932,16 +9932,34 @@ if (__DEV__) { if (currentHook === null) { // This is a rerender during a mount. - return mountDeferredValueImpl(hook, value); + return mountDeferredValueImpl(hook, value, initialValue); } else { // This is a rerender during an update. var prevValue = currentHook.memoizedState; - return updateDeferredValueImpl(hook, prevValue, value); + return updateDeferredValueImpl(hook, prevValue, value, initialValue); } } function mountDeferredValueImpl(hook, value, initialValue) { - { + if ( + // When `initialValue` is provided, we defer the initial render even if the + // current render is not synchronous. + initialValue !== undefined && // However, to avoid waterfalls, we do not defer if this render + // was itself spawned by an earlier useDeferredValue. Check if DeferredLane + // is part of the render lanes. + !includesSomeLane(renderLanes, DeferredLane) + ) { + // Render with the initial value + hook.memoizedState = initialValue; // Schedule a deferred render to switch to the final value. + + var deferredLane = requestDeferredLane(); + currentlyRenderingFiber$1.lanes = mergeLanes( + currentlyRenderingFiber$1.lanes, + deferredLane + ); + markSkippedUpdateLanes(deferredLane); + return initialValue; + } else { hook.memoizedState = value; return value; } @@ -9958,7 +9976,7 @@ if (__DEV__) { if (isCurrentTreeHidden()) { // Revealing a prerendered tree is considered the same as mounting new // one, so we reuse the "mount" path in this case. - var resultValue = mountDeferredValueImpl(hook, value); // Unlike during an actual mount, we need to mark this as an update if + var resultValue = mountDeferredValueImpl(hook, value, initialValue); // Unlike during an actual mount, we need to mark this as an update if // the value changed. if (!objectIs(resultValue, prevValue)) { @@ -10635,7 +10653,7 @@ if (__DEV__) { useDeferredValue: function (value, initialValue) { currentHookNameInDev = "useDeferredValue"; mountHookTypesDev(); - return mountDeferredValue(value); + return mountDeferredValue(value, initialValue); }, useTransition: function () { currentHookNameInDev = "useTransition"; @@ -10791,7 +10809,7 @@ if (__DEV__) { useDeferredValue: function (value, initialValue) { currentHookNameInDev = "useDeferredValue"; updateHookTypesDev(); - return mountDeferredValue(value); + return mountDeferredValue(value, initialValue); }, useTransition: function () { currentHookNameInDev = "useTransition"; @@ -10940,7 +10958,7 @@ if (__DEV__) { useDeferredValue: function (value, initialValue) { currentHookNameInDev = "useDeferredValue"; updateHookTypesDev(); - return updateDeferredValue(value); + return updateDeferredValue(value, initialValue); }, useTransition: function () { currentHookNameInDev = "useTransition"; @@ -11097,7 +11115,7 @@ if (__DEV__) { useDeferredValue: function (value, initialValue) { currentHookNameInDev = "useDeferredValue"; updateHookTypesDev(); - return rerenderDeferredValue(value); + return rerenderDeferredValue(value, initialValue); }, useTransition: function () { currentHookNameInDev = "useTransition"; @@ -11270,7 +11288,7 @@ if (__DEV__) { currentHookNameInDev = "useDeferredValue"; warnInvalidHookAccess(); mountHookTypesDev(); - return mountDeferredValue(value); + return mountDeferredValue(value, initialValue); }, useTransition: function () { currentHookNameInDev = "useTransition"; @@ -11445,7 +11463,7 @@ if (__DEV__) { currentHookNameInDev = "useDeferredValue"; warnInvalidHookAccess(); updateHookTypesDev(); - return updateDeferredValue(value); + return updateDeferredValue(value, initialValue); }, useTransition: function () { currentHookNameInDev = "useTransition"; @@ -11620,7 +11638,7 @@ if (__DEV__) { currentHookNameInDev = "useDeferredValue"; warnInvalidHookAccess(); updateHookTypesDev(); - return rerenderDeferredValue(value); + return rerenderDeferredValue(value, initialValue); }, useTransition: function () { currentHookNameInDev = "useTransition"; @@ -26655,7 +26673,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-canary-d96f3fda"; + var ReactVersion = "19.0.0-canary-a47ffde4"; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol 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 e5b4b357bbe5e..78892556831a9 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<<9206ca0f6781a4c840d6d393f26b3429>> */ "use strict"; @@ -2946,26 +2946,24 @@ function updateMemo(nextCreate, deps) { hook.memoizedState = [prevState, deps]; return prevState; } -function mountDeferredValueImpl(hook, value, initialValue) { - if (void 0 === initialValue || 0 !== (renderLanes & 1073741824)) - return (hook.memoizedState = value); - hook.memoizedState = initialValue; - hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; - workInProgressRootSkippedLanes |= hook; - return initialValue; -} -function updateDeferredValueImpl(hook, prevValue, value, initialValue) { +function updateDeferredValueImpl(hook, prevValue, value) { if (objectIs(value, prevValue)) return value; if (null !== currentTreeHiddenStackCursor.current) return ( - (hook = mountDeferredValueImpl(hook, value, initialValue)), - objectIs(hook, prevValue) || (didReceiveUpdate = !0), - hook + (hook.memoizedState = value), + objectIs(value, prevValue) || (didReceiveUpdate = !0), + value ); if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); - hook = requestDeferredLane(); + 0 === workInProgressDeferredLane && + (workInProgressDeferredLane = + 0 !== (workInProgressRootRenderLanes & 536870912) + ? 536870912 + : claimNextTransitionLane()); + hook = suspenseHandlerStackCursor.current; + null !== hook && (hook.flags |= 32); + hook = workInProgressDeferredLane; currentlyRenderingFiber$1.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; @@ -3231,9 +3229,9 @@ var HooksDispatcherOnMount = { return [initialState.memoizedState, dispatch]; }, useDebugValue: mountDebugValue, - useDeferredValue: function (value, initialValue) { - var hook = mountWorkInProgressHook(); - return mountDeferredValueImpl(hook, value, initialValue); + useDeferredValue: function (value) { + mountWorkInProgressHook().memoizedState = value; + return value; }, useTransition: function () { var stateHook = mountStateImpl(!1); @@ -3328,14 +3326,9 @@ var HooksDispatcherOnUpdate = { return updateReducer(basicStateReducer); }, useDebugValue: mountDebugValue, - useDeferredValue: function (value, initialValue) { + useDeferredValue: function (value) { var hook = updateWorkInProgressHook(); - return updateDeferredValueImpl( - hook, - currentHook.memoizedState, - value, - initialValue - ); + return updateDeferredValueImpl(hook, currentHook.memoizedState, value); }, useTransition: function () { var booleanOrThenable = updateReducer(basicStateReducer)[0], @@ -3375,16 +3368,11 @@ var HooksDispatcherOnRerender = { return rerenderReducer(basicStateReducer); }, useDebugValue: mountDebugValue, - useDeferredValue: function (value, initialValue) { + useDeferredValue: function (value) { var hook = updateWorkInProgressHook(); return null === currentHook - ? mountDeferredValueImpl(hook, value, initialValue) - : updateDeferredValueImpl( - hook, - currentHook.memoizedState, - value, - initialValue - ); + ? ((hook.memoizedState = value), value) + : updateDeferredValueImpl(hook, currentHook.memoizedState, value); }, useTransition: function () { var booleanOrThenable = rerenderReducer(basicStateReducer)[0], @@ -7909,16 +7897,6 @@ function requestUpdateLane(fiber) { fiber = 0 !== currentUpdatePriority ? currentUpdatePriority : 32; return fiber; } -function requestDeferredLane() { - 0 === workInProgressDeferredLane && - (workInProgressDeferredLane = - 0 !== (workInProgressRootRenderLanes & 536870912) - ? 536870912 - : claimNextTransitionLane()); - var suspenseHandler = suspenseHandlerStackCursor.current; - null !== suspenseHandler && (suspenseHandler.flags |= 32); - return workInProgressDeferredLane; -} function scheduleUpdateOnFiber(root, fiber, lane) { if ( (root === workInProgressRoot && 2 === workInProgressSuspendedReason) || @@ -9777,12 +9755,12 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_1082 = { +var devToolsConfig$jscomp$inline_1101 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-canary-7fb14041", + version: "19.0.0-canary-39a6938a", rendererPackageName: "react-test-renderer" }; (function (internals) { @@ -9799,10 +9777,10 @@ var devToolsConfig$jscomp$inline_1082 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1082.bundleType, - version: devToolsConfig$jscomp$inline_1082.version, - rendererPackageName: devToolsConfig$jscomp$inline_1082.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1082.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1101.bundleType, + version: devToolsConfig$jscomp$inline_1101.version, + rendererPackageName: devToolsConfig$jscomp$inline_1101.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1101.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9819,14 +9797,14 @@ var devToolsConfig$jscomp$inline_1082 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1082.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1101.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-7fb14041" + reconcilerVersion: "19.0.0-canary-39a6938a" }); exports._Scheduler = Scheduler; exports.act = act; 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 1217eea76ae38..ca495334c2409 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 @@ -4ca20fd36b2444a74279e7022f89894710b1daab +da6ba53b10d8240fc251ba14a3e5878604d3dc7d