From 92c6225d4050c7a23e384348fefd9b5d6a726aad Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 21 Apr 2023 10:45:08 +0400 Subject: [PATCH] useInstanceId: Fix useMemo hook dependencies (#49979) --- packages/compose/src/hooks/use-instance-id/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compose/src/hooks/use-instance-id/index.ts b/packages/compose/src/hooks/use-instance-id/index.ts index 12f71361cacb5..8f21c9657e8fa 100644 --- a/packages/compose/src/hooks/use-instance-id/index.ts +++ b/packages/compose/src/hooks/use-instance-id/index.ts @@ -55,7 +55,7 @@ function useInstanceId( const id = createId( object ); return prefix ? `${ prefix }-${ id }` : id; - }, [ object ] ); + }, [ object, preferredId, prefix ] ); } export default useInstanceId;