diff --git a/example/src/App.tsx b/example/src/App.tsx index 2b4c32b75..d6c8a7fef 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -69,12 +69,13 @@ export function App() { const scrollViewerTo = useRef((highlight: IHighlight) => {}); + // biome-ignore lint/correctness/useExhaustiveDependencies(a): const scrollToHighlightFromHash = useCallback(() => { const highlight = getHighlightById(parseIdFromHash()); if (highlight) { scrollViewerTo.current(highlight); } - }, []); + }, [highlights]); useEffect(() => { window.addEventListener("hashchange", scrollToHighlightFromHash, false);