From 71230f244f53a49ced73cba490ad767c31d98c69 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 13 Dec 2023 19:07:55 -0600 Subject: [PATCH] Memo --- src/view/nova/lib/system.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/view/nova/lib/system.tsx b/src/view/nova/lib/system.tsx index 3d3e82bc15..ad2cc44773 100644 --- a/src/view/nova/lib/system.tsx +++ b/src/view/nova/lib/system.tsx @@ -98,7 +98,10 @@ export function createSystem< function useStyle(props: ResponsiveStyleProps) { const {theme} = useTheme() const breakpoints = useBreakpoints() - return theme.style(props as StylesAndProps, breakpoints.active).styles + return React.useMemo( + () => theme.style(props as StylesAndProps, breakpoints.active).styles, + [breakpoints.active, props, theme], + ) } function useStyles>(