Skip to content

Commit fa7e52a

Browse files
perf(web): the composer path search hook compiles without manual memoization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 70d60e0 commit fa7e52a

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎apps/web/reactCompiledFiles.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,5 @@ export const REACT_COMPILED_FILES = [
9696
"apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx",
9797
"apps/web/src/components/ThreadTerminalDrawer.tsx",
9898
"apps/web/src/components/settings/SettingsPanels.tsx",
99+
"apps/web/src/lib/composerPathSearchState.ts",
99100
] as const;

‎apps/web/src/lib/composerPathSearchState.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,11 @@ import {
33
type ComposerPathSearchTarget,
44
} from "@t3tools/client-runtime/state/threads";
55

6-
import { useMemo } from "react";
7-
86
import { useComposerPathSearch as useComposerPathSearchQuery } from "../state/queries";
97

108
export function useComposerPathSearch(target: ComposerPathSearchTarget): ComposerPathSearchState {
119
const state = useComposerPathSearchQuery(target);
12-
const entries = useMemo(
13-
() => state.entries.map((entry) => ({ path: entry.path, kind: entry.kind })),
14-
[state.entries],
15-
);
10+
const entries = state.entries.map((entry) => ({ path: entry.path, kind: entry.kind }));
1611
return {
1712
entries,
1813
error: state.error,

0 commit comments

Comments
 (0)