Skip to content

Commit 4c22df2

Browse files
perf(web): the composer path search hook compiles without manual memoization (pingdotgg#20595)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent e648318 commit 4c22df2

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎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)