<commit_before>import React from 'react';
import { connect } from 'react-redux';
import uuid from 'uuid';
import { postMessage, requestDelete } from '../actions';
import Form from './Form';
import MessageList from './MessageList';

const Mesa = React.createClass({
  handleDelete: function(message, e) {
    e.preventDefault();
    this.props.dispatch(requestDelete(message));
  },

  handleSubmit: function(message) {
    this.props.dispatch(postMessage({
      uuid: uuid.v4(),
      text: message,
      created_at: new Date().toJSON()
    }));
  },

  render: function() {
    return (
      <div>
        <Form onSubmit={this.handleSubmit} />
        <MessageList
          messages={this.props.messages}
          onDelete={this.handleDelete}
        />
      </div>
    );
  }
});

function select(state) {
  return {
    messages: state.messages
  }
}

export default connect(select)(Mesa);
<commit_msg>Export undecorated component for testing<commit_after>import React from 'react';
import { connect } from 'react-redux';
import uuid from 'uuid';
import { postMessage, requestDelete } from '../actions';
import Form from './Form';
import MessageList from './MessageList';

export const Mesa = React.createClass({
  handleDelete: function(message, e) {
    e.preventDefault();
    this.props.dispatch(requestDelete(message));
  },

  handleSubmit: function(message) {
    this.props.dispatch(postMessage({
      uuid: uuid.v4(),
      text: message,
      created_at: new Date().toJSON()
    }));
  },

  render: function() {
    return (
      <div>
        <Form onSubmit={this.handleSubmit} />
        <MessageList
          messages={this.props.messages}
          onDelete={this.handleDelete}
        />
      </div>
    );
  }
});

function select(state) {
  return {
    messages: state.messages
  }
}

export default connect(select)(Mesa);

{'fraction_non_alphanumeric': 0.14224137931034483, 'fraction_numerical': 0.0010775862068965517, 'mean_word_length': 3.002155172413793, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6487770', 'n_tokens_mistral': 547, 'n_tokens_neox': 549, 'n_words': 127}