{"size": 1204, "ext": "js", "max_stars_repo_path": "src/index.js", "max_stars_repo_name": "Canner/coren-example", "max_stars_repo_stars_event_min_datetime": "2018-03-22T08:20:45.000Z", "max_stars_repo_stars_event_max_datetime": "2019-10-22T06:26:16.000Z", "max_issues_repo_path": "src/index.js", "max_issues_repo_name": "wwwy3y3/coren-example", "max_issues_repo_issues_event_min_datetime": "2017-08-05T14:39:00.000Z", "max_issues_repo_issues_event_max_datetime": "2018-03-03T15:05:20.000Z", "max_forks_repo_path": "src/index.js", "max_forks_repo_name": "Canner/coren-example", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 25.0833333333, "max_line_length": 57, "alphanum_fraction": 0.6287375415}
import React, {Component} from 'react';
import {Route, Link} from 'react-router-dom';
import {Provider} from 'react-redux';
import {BrowserRouter as Router} from 'react-router-dom';
import {ssr, reactRouterRedux, wrapDOM} from 'coren';
import Home from './Home';
import UserList from './UserList';
import User from './User';
import configureStore from './configureStore';
import reducer from './reducer';

let store;
if (process.env.isBrowser) {
  const preloadedState = window.__PRELOADED_STATE__;
  delete window.__PRELOADED_STATE__;
  store = configureStore(preloadedState);
}

@reactRouterRedux({reducer})
@wrapDOM(({children}) => {
  console.log(store.getState());
  return (
    <Provider store={store}>
      <Router>
        {children}
      </Router>
    </Provider>
  );
})
@ssr
export default class Root extends Component {
  render() {
    return (
      <div>
        <ul>
          <li><Link to="/">Home</Link></li>
          <li><Link to="/users">All Users</Link></li>
        </ul>

        <hr/>
        <Route exact path="/" component={Home}/>
        <Route exact path="/users" component={UserList}/>
        <Route exact path="/users/:id" component={User}/>
      </div>
    );
  }
}
