chore(lint): memoize inline styles in _layout

Fixes 3 react-perf/jsx-no-new-object-as-prop warnings in root layout by
memoizing the stack screen options, the agent screen override, and the
GestureHandlerRootView root style.
This commit is contained in:
Mohamed Boudra
2026-04-24 02:41:57 +07:00
parent 8a3129ff15
commit 1a53673535

View File

@@ -900,9 +900,13 @@ function NavigationActiveWorkspaceObserver() {
export default function RootLayout() {
const { theme } = useUnistyles();
const gestureRootStyle = useMemo(
() => ({ flex: 1, backgroundColor: theme.colors.surface0 }),
[theme.colors.surface0],
);
return (
<GestureHandlerRootView style={{ flex: 1, backgroundColor: theme.colors.surface0 }}>
<GestureHandlerRootView style={gestureRootStyle}>
<NavigationActiveWorkspaceObserver />
<PortalProvider>
<SafeAreaProvider>