<commit_before>var Wrapper = React.createClass({

    loadFromServer: function() {
        $.ajax({
            url: this.props.url,
            dataType: 'json',
            success: function(data) {
                this.setState({model: data});
            }.bind(this),
            error: function(xhr, status, err) {
                console.error(this.props.url, status, err.toString());
            }.bind(this)
        });
    },

    getInitialState: function(){
        return {model: []};
    },

    componentDidMount: function() {
        this.loadFromServer();
        setInterval(this.loadFromServer, this.props.interval);
    },
    render: function () {
        return (
            <div className="medium-3 columns">
                <div className="panel widget">
                    <h4> {this.state.model.Title}</h4>
                    <hr />
                    <this.props.component model={this.state.model} />
                </div>
            </div>
        );
    }
});<commit_msg>wrapper: fix child element creation<commit_after>var Wrapper = React.createClass({

  loadFromServer: function() {
    $.ajax({
      url: this.props.url,
      dataType: 'json',
      success: function(data) {
        this.setState({model: data});
      }.bind(this),
      error: function(xhr, status, err) {
        console.error(this.props.url, status, err.toString());
      }.bind(this)
    });
  },

  getInitialState: function(){
    return {model: []};
  },

  componentDidMount: function() {
    this.loadFromServer();
    setInterval(this.loadFromServer, this.props.interval);
  },
  render: function () {
    return (
      <div className="medium-3 columns">
        <div className="panel widget">
          <h4> {this.state.model.Title}</h4>
          <hr />
          {React.createElement(window[this.props.component], {model: this.state.model})}
        </div>
      </div>
    );
  }
});

{'fraction_non_alphanumeric': 0.1549738219895288, 'fraction_numerical': 0.0031413612565445027, 'mean_word_length': 1.8954545454545455, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, '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': '6316244', 'n_tokens_mistral': 561, 'n_tokens_neox': 546, 'n_words': 101}