import React, { Component } from 'react';
import { Editor } from '@redux-devtools/ui';
import { stringify } from 'javascript-stringify';
export default class RawTab extends Component {
  constructor(props) {
    super(props);
    this.stringifyData(props);
  }
  shouldComponentUpdate(nextProps) {
    return nextProps.data !== this.value;
  }
  UNSAFE_componentWillUpdate(nextProps) {
    this.stringifyData(nextProps);
  }
  stringifyData(props) {
    this.value = stringify(props.data, null, 2);
  }
  render() {
    return /*#__PURE__*/React.createElement(Editor, {
      value: this.value
    });
  }
}