From c0e5e4e19085a4f3d4cc8c2590305cd2a8f0b57c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aykut=20Sara=C3=A7?= Date: Fri, 18 Mar 2022 11:42:45 +0300 Subject: [PATCH] add missing dependency values --- src/containers/JsonEditor/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers/JsonEditor/index.tsx b/src/containers/JsonEditor/index.tsx index 21a97f0..ff1a362 100644 --- a/src/containers/JsonEditor/index.tsx +++ b/src/containers/JsonEditor/index.tsx @@ -91,7 +91,7 @@ const JsonEditor: React.FC<{ } setValue(json); - }, [json]); + }, [config.autoformat, json]); React.useEffect(() => { const formatTimer = setTimeout(() => { @@ -107,7 +107,7 @@ const JsonEditor: React.FC<{ }, 1000); return () => clearTimeout(formatTimer); - }, [value, config.autoformat]); + }, [value, config.autoformat, setJson]); return (