<commit_before>import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory, RouterContext } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import store from './store';
import routes from './routes';

// Hot Reload!
if (module.hot) module.hot.accept();

// Always check if env.BROWSER
if (process.env.BROWSER) {
  require('../../../node_modules/sanitize.css/sanitize.css');
  require('./style/skeleton.scss');
}

class Application extends React.Component {
  static name = 'HelloWorld'; // The Application's name must coincide with the folder's name.
  static routerProps = {}; // It's defined by the server when matching the url with the routes.
  static store = store;
  static Routes = routes;
  componentDidMount() {
    // Let the reducer(s) decide if it should load the state from "PRELOAD_STATE"
    if (process.env.BROWSER) store.dispatch({ type: 'PRELOAD_STATE' });
  }
  render() {
    return (
      <Provider store={store}>
        {process.env.BROWSER ? // Client-Side / Server-Side rendering
          <Router
            history={syncHistoryWithStore(browserHistory, store)}
          >
            {Application.Routes}
          </Router> :
          <RouterContext {...this.props.routerProps} />
        }
      </Provider>
    );
  }
}

// Render only in client-side.
if (process.env.BROWSER) {
  render(
    <Application />,
    document.getElementById('app-body'),
  );
}
export default Application;
<commit_msg>Put routes, store, and app in separate files.<commit_after>import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory, RouterContext } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import store from './store';
import routes from './routes';

// Hot Reload!
if (module.hot) module.hot.accept();

// Always check if env.BROWSER
if (process.env.BROWSER) {
  require('../../../node_modules/sanitize.css/sanitize.css');
  require('./style/skeleton.scss');
}

class Application extends React.Component {
  static name = 'HelloWorld'; // The Application's name must coincide with the folder's name.
  static routerProps = {}; // It's defined by the server when matching the url with the routes.
  static store = store;
  static Routes = routes;
  componentDidMount() {
    // Let the reducer(s) decide if it should load the state from "PRELOAD_STATE"
    if (process.env.BROWSER) store.dispatch({ type: 'PRELOAD_STATE' });
  }
  render() {
    return (
      <Provider store={store}>
        {process.env.BROWSER ? // Client-Side / Server-Side rendering
          <Router history={syncHistoryWithStore(browserHistory, store)}>
            {Application.Routes}
          </Router> :
          <RouterContext {...this.props.routerProps} />
        }
      </Provider>
    );
  }
}

// Render only in client-side.
if (process.env.BROWSER) {
  render(
    <Application />,
    document.getElementById('app-body'),
  );
}
export default Application;

{'fraction_non_alphanumeric': 0.1383219954648526, 'fraction_numerical': 0.0, 'mean_word_length': 3.106382978723404, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '232288', 'n_tokens_mistral': 920, 'n_tokens_neox': 907, 'n_words': 257}