From 13eb61d0566bdcb6e41a19e433f66ec2ebf62bde Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Tue, 16 Apr 2024 12:12:32 -0400 Subject: [PATCH] Move enableUseDeferredValueInitialArg to canary (#28818) Per team discussion, this upgrades the `initialValue` argument for `useDeferredValue` from experimental to canary. - Original implementation PR: https://github.com/facebook/react/pull/27500 - API documentation PR: https://github.com/reactjs/react.dev/pull/6747 I left it disabled at Meta for now in case there's old code somewhere that is still passing an `options` object as the second argument. --- packages/shared/ReactFeatureFlags.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/shared/ReactFeatureFlags.js b/packages/shared/ReactFeatureFlags.js index f427540563cb..700e85ea6de9 100644 --- a/packages/shared/ReactFeatureFlags.js +++ b/packages/shared/ReactFeatureFlags.js @@ -116,8 +116,6 @@ export const alwaysThrottleRetries = true; export const passChildrenWhenCloningPersistedNodes = false; -export const enableUseDeferredValueInitialArg = __EXPERIMENTAL__; - export const enableServerComponentLogs = __EXPERIMENTAL__; /** @@ -191,6 +189,9 @@ export const disableDOMTestUtils = true; // Make equivalent to instead of export const enableRenderableContext = true; +// Enables the `initialValue` option for `useDeferredValue` +export const enableUseDeferredValueInitialArg = true; + // ----------------------------------------------------------------------------- // Chopping Block //