From 97572fd5a20a21fc1786c503e21f3bb4e85981ae Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 8 Feb 2024 13:31:37 -0600 Subject: [PATCH] Memoize --- src/components/dialogs/index.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/dialogs/index.tsx b/src/components/dialogs/index.tsx index 58eecb7705..5122703ccd 100644 --- a/src/components/dialogs/index.tsx +++ b/src/components/dialogs/index.tsx @@ -89,7 +89,11 @@ export function GlobalDialog() { popTopDialog() }, [popTopDialog]) - return activeDialogs.map(({component: Comp, props, options}, i) => { - return - }) + return React.useMemo( + () => + activeDialogs.map(({component: Comp, props, options}, i) => { + return + }), + [activeDialogs, cleanup], + ) }