<commit_before>import React, { createClass } from 'react'

const PropsList = createClass({
  render() {
    const { propsList, onUpdateState } = this.props

    return (
      <div>
        <h2>Props</h2>

        {Object.keys(propsList).map((key, i) => {
          return (
            <code
              key={i}>
              <span>
                {key}:
              </span>

              <input
                type="text"
                onChange={onUpdateState}
                data-key={key}
                value={propsList[key]}>
              </input>

              <br />
            </code>
          )
        })}
      </div><commit_msg>update propsList to use state<commit_after>import React, { createClass } from 'react'

const PropsList = createClass({
  getInitialState() {
    return this.props.propsList || {}
  },

  handleUpdateState(e) {
    const state = {}
    state[e.target.dataset.key] = e.target.value

    this.setState(state)
    this.props.onUpdateState(e)
  },

  render() {
    return (
      <div>
        <h2>Props</h2>

        {Object.keys(this.state).map((key, i) => {
          return (
            <code
              key={i}>
              <span>
                {key}:
              </span>

              <input
                type="text"
                onChange={this.handleUpdateState}
                data-key={key}
                value={this.state[key]}>
              </input>

              <br />
            </code>
          )
        })}
      </div>
{'fraction_non_alphanumeric': 0.1348314606741573, 'fraction_numerical': 0.0026437541308658294, 'mean_word_length': 1.2102189781021897, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 27, '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': '4367833', 'n_tokens_mistral': 449, 'n_tokens_neox': 429, 'n_words': 75}