-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
53 lines (43 loc) · 1.18 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import React from 'react';
import { render } from 'react-dom';
// React components for Redux DevTools
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
// Connect redux with react
import { Provider } from 'react-redux';
// Containers & Screens
import Wrapper from './src/containers/Wrapper';
import Home from './src/containers/Home';
import Game from './src/containers/Game';
// React/redux router
import { Route, IndexRoute } from 'react-router';
import { ReduxRouter } from 'redux-router';
import configureStore from './src/redux/configureStore';
// TODO:
// Create store with initial states
const store = configureStore({
board: {
size: { width: 6, height: 4 }
},
hero: {
lives: 3,
position: { x: 0, y: 0 },
}
});
render(
<div>
<Provider store={store}>
<ReduxRouter>
<Route path="/" component={Wrapper}>
<IndexRoute component={Home}/>
<Route path="game" component={Game}/>
</Route>
</ReduxRouter>
</Provider>
{/*
<DebugPanel top right bottom>
<DevTools store={store} monitor={LogMonitor} />
</DebugPanel>
*/}
</div>,
document.getElementById('app')
);