<commit_before>import React, { Component } from 'react';
import PropTypes from 'prop-types';
import deepEqual from 'fast-deep-equal';
import { polyfill } from 'react-lifecycles-compat';
import { Form } from '@storybook/components';

class ObjectType extends Component {
  constructor(props) {
    super(props);

    this.state = {
      values: null,
      failed: false,
      state: '',
    };
  }

  static getDerivedStateFromProps(props, state) {
    if (!deepEqual(props.knob.value, state.json)) {
      try {
        return {
          value: JSON.stringify(props.knob.value, null, 2),
          failed: false,<commit_msg>Fix addon-knobs ObjectType knob react warning #5276<commit_after>import React, { Component } from 'react';
import PropTypes from 'prop-types';
import deepEqual from 'fast-deep-equal';
import { polyfill } from 'react-lifecycles-compat';
import { Form } from '@storybook/components';

class ObjectType extends Component {
  constructor(props) {
    super(props);

    this.state = {
      value: null,
      failed: false,
      json: props.knob.value,
    };
  }

  static getDerivedStateFromProps(props, state) {
    if (!deepEqual(props.knob.value, state.json)) {
      try {
        return {
          value: JSON.stringify(props.knob.value, null, 2),
          failed: false,
{'fraction_non_alphanumeric': 0.12404287901990811, 'fraction_numerical': 0.004594180704441042, 'mean_word_length': 3.1360759493670884, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1549993', 'n_tokens_mistral': 401, 'n_tokens_neox': 391, 'n_words': 100}