You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: reload highlighter when language is available (#2601)
* fix: reload highlighter when language is available
- add language to list of deps, to trigger a re-render once available
- persist highlighter loader in a ref, to avoid unnecessary rerenders
- memoize language computation from className
* prevent loading the highlighter when component unmounts; remove import caching; stabilize CodeSkeleton
- import caching is not needed as dynamic from nextjs already does that
- CodeSkeleton depends on changing props, they're now part of the callback dependencies
* remove unnecessary deps from loadHighlighter callback
0 commit comments