diff --git a/sandpack-react/src/Playground.stories.tsx b/sandpack-react/src/Playground.stories.tsx index 28b7d23dd..1ad34473a 100644 --- a/sandpack-react/src/Playground.stories.tsx +++ b/sandpack-react/src/Playground.stories.tsx @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import * as themes from "@codesandbox/sandpack-themes"; import React from "react"; import { Sandpack } from "./"; @@ -9,37 +8,16 @@ export default { }; export const Basic: React.FC = () => { - return ; + return ( + <> + {new Array(10).fill(null).map((_, index) => ( + + ))} + + ); }; - -export const EslintBasic = () => ( - -); diff --git a/sandpack-react/src/contexts/utils/useClient.ts b/sandpack-react/src/contexts/utils/useClient.ts index 88f569102..6597b7826 100644 --- a/sandpack-react/src/contexts/utils/useClient.ts +++ b/sandpack-react/src/contexts/utils/useClient.ts @@ -310,10 +310,10 @@ export const useClient: UseClient = ( client.iframe.contentWindow?.location.replace("about:blank"); client.iframe.removeAttribute("src"); delete clients.current[clientId]; + } else { + delete registeredIframes.current[clientId]; } - delete registeredIframes.current[clientId]; - if (timeoutHook.current) { clearTimeout(timeoutHook.current); }