Skip to content

Commit 8ab60d4

Browse files
perf(web): the code view file reveal hook compiles without manual memoization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a702563 commit 8ab60d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/web/src/components/diffs/useCodeViewFileReveal.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { CodeViewScrollTarget } from "@pierre/diffs";
2-
import { useCallback, useEffect, useRef, useState } from "react";
2+
import { useEffect, useRef, useState } from "react";
33

44
interface FileRevealHandle {
55
getInstance(): object | undefined;
@@ -27,5 +27,5 @@ export function useCodeViewFileReveal<TScope>(
2727
handledRequest.current = request;
2828
}, [request, scope, viewer, readyFileKeys]);
2929

30-
return useCallback((fileKey: string) => setRequest({ fileKey, scope }), [scope]);
30+
return (fileKey: string) => setRequest({ fileKey, scope });
3131
}

0 commit comments

Comments
 (0)