@devries-cameron20 / t3code Mirror · read-only / commits / 7e20a5b8f6
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 17:00 UTC

chore(lint): enforce react/no-unstable-nested-components (#25111)

Julius Marminge committed Oct 25, 2026 at 19:32 UTC 7e20a5b8f626c5abf9af3fccedb719960ae35bde
3 files changed +10 -6
apps/mobile/src/Stack.tsx
+3
@@ -1077,6 +1077,7 @@ export const RootStack = RootStackConfig.with(function AdaptiveRootStack({ Navig
1077 const nativeMetrics = useNativeLayoutMetrics();
1078 const usesSplitView = deriveLayout({ width, height, nativeMetrics }).usesSplitView;
1079
1080 + /* oxlint-disable react/no-unstable-nested-components -- React Navigation invokes screenLayout as a render callback. */
1081 return (
1082 <Navigator
1083 screenLayout={(props) => <GuardedScreenLayout {...props} />}
@@ -1087,6 +1088,8 @@ export const RootStack = RootStackConfig.with(function AdaptiveRootStack({ Navig
1088 }
1089 />
1090 );
1091 +
1092 + /* oxlint-enable react/no-unstable-nested-components */
1093 });
1094
1095 type RootStackType = typeof RootStack;
apps/mobile/src/features/threads/ThreadRouteScreen.tsx
+6 -6
@@ -558,14 +558,14 @@ function ThreadRouteContent(
558 };
559 const safeAreaInsets = useSafeAreaInsets();
560 const inspectorHeaderInset = Platform.OS === "ios" ? 0 : safeAreaInsets.top;
561 - const GitInspector = () => (
561 + const renderGitInspector = () => (
562 <GitOverviewSheet
563 headerInset={inspectorHeaderInset}
564 presentation="inspector"
565 route={{ params: { environmentId: environmentId!, threadId: threadId! } }}
566 />
567 );
568 - const FilesInspector = () =>
568 + const renderFilesInspector = () =>
569 selectedThread !== null && selectedThreadCwd !== null ? (
570 <ThreadFileNavigatorPane
571 cwd={selectedThreadCwd}
@@ -576,7 +576,7 @@ function ThreadRouteContent(
576 onSelectFile={handleSelectInspectorFile}
577 />
578 ) : null;
579 - const RouteInspector = () => props.renderInspector?.(inspectorHeaderInset);
579 + const renderRouteInspector = () => props.renderInspector?.(inspectorHeaderInset);
580 const renderPreviewInspector = () =>
581 previewTarget && panes.auxiliaryPaneVisible ? (
582 <ThreadInspectorPreview
@@ -600,11 +600,11 @@ function ThreadRouteContent(
600 inspectorMode === null ? null : (
601 <ThreadInspectorContentStack
602 renderPreview={renderPreviewInspector}
603 - renderFiles={FilesInspector}
604 - renderGit={GitInspector}
603 + renderFiles={renderFilesInspector}
604 + renderGit={renderGitInspector}
605 mode={inspectorMode}
606 resetKeys={[routeThreadIdentity, selectedThreadCwd]}
607 - renderRoute={props.renderInspector ? RouteInspector : undefined}
607 + renderRoute={props.renderInspector ? renderRouteInspector : undefined}
608 />
609 );
610 const activeInspectorRenderer =
vite.config.ts
+1
@@ -216,6 +216,7 @@ export default defineConfig({
216 perf: "warn",
217 },
218 rules: {
219 + "react/no-unstable-nested-components": "error",
220 "react/static-components": "error",
221 "react/capitalized-calls": "error",
222 "typescript/no-extraneous-class": "error",