diff --git a/frontend/src/components/Preview.tsx b/frontend/src/components/Preview.tsx index 24f33c0..42cc7b0 100644 --- a/frontend/src/components/Preview.tsx +++ b/frontend/src/components/Preview.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef } from 'react'; +import { useEffect, useRef } from "react"; import classNames from "classnames"; import useThrottle from "../hooks/useThrottle"; @@ -8,7 +8,9 @@ interface Props { } function Preview({ code, device }: Props) { - const throttledCode = useThrottle(code, 200); + const throttledCode = code; + // Temporary disable throttling for the preview not updating when the code changes + // useThrottle(code, 200); const iframeRef = useRef(null); useEffect(() => { @@ -39,4 +41,4 @@ function Preview({ code, device }: Props) { ); } -export default Preview; \ No newline at end of file +export default Preview;