<commit_before>import React, { Component } from 'react';

/* global styles for app */
import './styles/app.scss';

/* application components */
import { Header } from '../../components/Header';
import { Footer } from '../../components/Footer';

export class App extends Component {
  static propTypes = {
    children: React.PropTypes.any,
  };

  render() {
    return (
      <section>
        <Header />
        {this.props.children}
        <Footer />
      </section>
    );
  }
}
<commit_msg>Move socket connection into main App container, pass the connection instance as a property to children components<commit_after>import React, { Component } from 'react';

/* global styles for app */
import './styles/app.scss';

/* application components */
import { Header } from '../../components/Header';
import { Footer } from '../../components/Footer';

export class App extends Component {
  static propTypes = {
    children: React.PropTypes.any,
  };

  constructor(props) {
    super(props);

    this.socket = io();
  }

  render() {
    return (
      <section>
        <Header />
        {this.props.children && React.cloneElement(this.props.children, {
          socket: this.socket
        })}
        <Footer />
      </section>
    );
  }
}

{'fraction_non_alphanumeric': 0.14764565043894654, 'fraction_numerical': 0.0, 'mean_word_length': 2.473684210526316, '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': '5257863', 'n_tokens_mistral': 355, 'n_tokens_neox': 353, 'n_words': 97}