json cell data view performance fix

This commit is contained in:
Jan Prochazka
2021-01-14 09:45:27 +01:00
parent c2ccf27adf
commit 2f2310a883

View File

@@ -21,7 +21,7 @@ const InnerWrapper = styled.div`
export default function JsonCellView({ value }) {
const theme = useTheme();
try {
const json = JSON.parse(value);
const json = React.useMemo(() => JSON.parse(value), [value]);
return (
<OuterWrapper>
<InnerWrapper>