Skip to content

Commit 53a82f3

Browse files
claude[bot]claude
authored andcommitted
fix: update useMemo dependencies after useStableOptions refactor
- Replace undefined variables (langRev, themeRev, optsRev) with stable references - Fixes runtime error caused by missing dependency variables - Maintains proper dependency tracking for re-computation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8a71580 commit 53a82f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

package/src/lib/hook.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ export const useShikiHighlighter = <F extends OutputFormat = 'react'>(
7373

7474
const shikiOptions = useMemo(
7575
() => buildShikiOptions(languageId, themeResult, stableOpts),
76-
// Revs ensure recompute even if useStableOptions returns same reference
77-
[languageId, themeResult, langRev, themeRev, optsRev]
76+
// Stable references ensure recompute when content changes
77+
[languageId, themeResult, stableLang, stableTheme, stableOpts]
7878
);
7979

8080
useEffect(() => {

0 commit comments

Comments
 (0)