Skip to content

Commit

Permalink
Fix useMemo error & updating when switch from one to another story di…
Browse files Browse the repository at this point in the history
…rectly

- useMemo error happened when ?raw imports were loaded with HMR
  • Loading branch information
Florian Dendorfer committed Mar 15, 2024
1 parent 62a7a8c commit a22dd81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CodePanelProps } from './types';

export default function CodePanel({ sourceFiles }: CodePanelProps) {
return (
<TabsState>
<TabsState key={sourceFiles.length + sourceFiles.length}>
{/* Create a tab for each prepared file */}
{sourceFiles.map((file, i) => (
// id is used as the key and title as the tab title by TabsState
Expand Down

0 comments on commit a22dd81

Please sign in to comment.