{"size": 1134, "ext": "js", "max_stars_repo_path": "source/index.js", "max_stars_repo_name": "romanlex/react-create.site-boilerplate", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "source/index.js", "max_issues_repo_name": "romanlex/react-create.site-boilerplate", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "source/index.js", "max_forks_repo_name": "romanlex/react-create.site-boilerplate", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.625, "max_line_length": 58, "alphanum_fraction": 0.7063492063}
import "babel-polyfill";
import React from 'react';
import ReactDOM from 'react-dom';
import 'styles/style.scss';
import { AppContainer } from 'react-hot-loader';
import FastClick from 'fastclick';
import injectTapEventPlugin from "react-tap-event-plugin";
import Root from "./containers/Root";
import store from 'common/store';

FastClick.attach(document.body);
// Fix mobile 300ms delay of tap
injectTapEventPlugin();

const domContainer = document.getElementById('app');
const renderApp = RootComponent => {
	ReactDOM.render(
		<AppContainer>
			<RootComponent />
		</AppContainer>,
		domContainer
	)
};

try {
	renderApp(Root);
} catch (error) {
	if (__DEVELOPMENT__) {
		throw error;
	}
	console.error(error);
}

// Hot Module Replacement (HMR)
if (__DEVELOPMENT__ && module.hot) {
	module.hot.accept([
		'./containers/Root',
	], () => {
		console.log('Accepting the updated module!');
		const newRoot = require('./containers/Root').default;
		renderApp(newRoot);
	});
	
	module.hot.accept('./reducers', () => {
		console.log('Accepting the updated reducer module!');
		store.replaceReducer(require('./reducers').default);
	});
}