add missing dependency values

This commit is contained in:
Aykut Saraç 2022-03-18 11:42:45 +03:00
parent 752d913d8d
commit c0e5e4e190

View File

@ -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 (
<StyledEditorWrapper>