1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute, Link, browserHistory } from 'react-router';
import App from './App';
import Home from './Home';
import GamesList from './GamesList';
import Game from './Game';

ReactDOM.render((
  <Router history={browserHistory}>
    <Route path="/" component={App}>
      <IndexRoute component={Home} />
      <Route path="/gameslist" component={GamesList} />
      <Route path="/game/:gameID" component={Game}/>
    </Route>
  </Router>
), document.getElementById('root'));