Skip to content

Commit

Permalink
fix: add dependency highlights in function callback scrollToHighlight…
Browse files Browse the repository at this point in the history
…FromHash
  • Loading branch information
thai.ly committed Dec 16, 2024
1 parent ae0968f commit 1b0f813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function App() {
if (highlight) {
scrollViewerTo.current(highlight);
}
}, []);
}, [highlights]);

useEffect(() => {
window.addEventListener("hashchange", scrollToHighlightFromHash, false);
Expand Down

0 comments on commit 1b0f813

Please sign in to comment.