15 lines
390 B
JavaScript
15 lines
390 B
JavaScript
'use strict';
|
|
|
|
import React from 'react/addons';
|
|
import Router from 'react-router';
|
|
|
|
import routes from './Routes';
|
|
|
|
if ( process.env.NODE_ENV !== 'production' ) {
|
|
// Enable React devtools
|
|
window.React = React;
|
|
}
|
|
|
|
Router.run(routes, Router.HistoryLocation, (Handler, state) => {
|
|
React.render(<Handler params={state.params} query={state.query} />, document.getElementById('app'));
|
|
}); |