{"size": 1215, "ext": "js", "max_stars_repo_path": "app/index.js", "max_stars_repo_name": "briancaffey/react-starter-app-test", "max_stars_repo_stars_event_min_datetime": "2019-12-08T14:54:40.000Z", "max_stars_repo_stars_event_max_datetime": "2019-12-08T14:54:40.000Z", "max_issues_repo_path": "app/index.js", "max_issues_repo_name": "briancaffey/react-starter-app-test", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/index.js", "max_forks_repo_name": "briancaffey/react-starter-app-test", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 29.6341463415, "max_line_length": 94, "alphanum_fraction": 0.7193415638}
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import FastClick from 'fastclick';
import { createBrowserHistory, startListener, Router } from 'redux-json-router';
import Layout from './components/Layout';
import configureStore from './redux/store';
import routeConfig from '../config/routes.json';

// create history singleton
const history = createBrowserHistory();

// configure store with history and default initialState
const store = configureStore(history);

// dispatch action if history is manually changed (with the navigation buttons or address bar)
startListener(history, store);

const render = (routes) => {
  ReactDOM.render(
    <Provider store={store}>
      <Layout>
        <Router routes={routes} />
      </Layout>
    </Provider>,
    document.getElementById('app'));
};

render(routeConfig);

// Eliminates the 300ms delay between a physical tap and the firing of a
// click event on mobile browsers. https://github.com/ftlabs/fastclick
FastClick.attach(document.body);

// Enable Hot Module Replacement (HMR)
if (module.hot) {
  module.hot.accept(['../config/routes.json', './components/Layout'], () => {
    render(routeConfig);
  });
}
