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;