diff --git a/src/client/components/jsonRenderer.tsx b/src/client/components/jsonRenderer.tsx index ff32ce9..815c0f3 100644 --- a/src/client/components/jsonRenderer.tsx +++ b/src/client/components/jsonRenderer.tsx @@ -51,7 +51,13 @@ const JsonRenderer = ({ data, expansionLevel }: JsonRendererProps) => { const [json, setJson] = useState(originalData) useEffect(() => { - setJson(data) + let mounted = true + if (mounted) { + setJson(data) + } + return () => { + mounted = false + } }, [data]) if (typeof json === "string") {