Skip to content
TypeScript

perf(web): the composer path search hook compiles without manual memoization (#20595)

Julius Marminge4c22df263f03
diff --git a/apps/web/src/lib/composerPathSearchState.ts b/apps/web/src/lib/composerPathSearchState.ts
index befcb173932..9ae590bcd7f 100644
--- a/apps/web/src/lib/composerPathSearchState.ts
+++ b/apps/web/src/lib/composerPathSearchState.ts
@@ -3,16 +3,11 @@ import {
type ComposerPathSearchTarget,
} from "@t3tools/client-runtime/state/threads";
-import { useMemo } from "react";
-
import { useComposerPathSearch as useComposerPathSearchQuery } from "../state/queries";
export function useComposerPathSearch(target: ComposerPathSearchTarget): ComposerPathSearchState {
const state = useComposerPathSearchQuery(target);
- const entries = useMemo(
- () => state.entries.map((entry) => ({ path: entry.path, kind: entry.kind })),
- [state.entries],
- );
+ const entries = state.entries.map((entry) => ({ path: entry.path, kind: entry.kind }));
return {
entries,
error: state.error,