import React from 'react'; import CodeMirror from '@uiw/react-codemirror'; import 'codemirror/theme/duotone-light.css'; class Redis extends React.Component { constructor(props) { super(props); this.state = { options: this.props.options }; } componentDidMount() { this.setState({ options: this.props.options }); } changeOption = (option, value) => { const { options } = this.state; const newOptions = { ...options, [option]: value }; this.setState({ options: newOptions }); this.props.optionsChanged(newOptions); }; render() { const { options } = this.state; return (