From 596cbc0ea8e39a3895dccfbc72aea71cf35269bb Mon Sep 17 00:00:00 2001 From: Matt Gallo Date: Thu, 6 Jun 2024 06:53:07 -0400 Subject: [PATCH] fix(FeatureFlags): remove forced rerender, causing focus issues (#5411) --- packages/core/.storybook/WithFeatureFlags/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/core/.storybook/WithFeatureFlags/index.js b/packages/core/.storybook/WithFeatureFlags/index.js index 1f5763bfa9..77067b5ecd 100644 --- a/packages/core/.storybook/WithFeatureFlags/index.js +++ b/packages/core/.storybook/WithFeatureFlags/index.js @@ -15,7 +15,6 @@ import { Annotation } from '../Annotation'; export const WithFeatureFlags = ({ flags, children }) => { const [updatedFlags, setUpdatedFlags] = useState(); - const [tempKey, setTempKey] = useState(0); const allFlagsEnabled = Object.fromEntries( Array.from(FeatureFlagScope.flags.keys()).map((k) => [k, true]) ); @@ -28,12 +27,11 @@ export const WithFeatureFlags = ({ flags, children }) => { FeatureFlagScope.flags.set(key, value); } setUpdatedFlags(FeatureFlagScope.flags); - setTempKey((prev) => prev + 1); } }, [flags]); return ( - +