-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.jsx
37 lines (31 loc) · 830 Bytes
/
index.jsx
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
// Enbale React debugging inside webpack-dev-server
if (window.parent !== window) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
}
// Master css
require("./style.scss")
import React from "react";
import ReactDOM from "react-dom";
import { createStore, applyMiddleware } from "redux";
import { Provider, connect } from "react-redux";
import thunk from 'redux-thunk';
import Board from "./components/Board"
import game from "./reducers"
const store = createStore(
game, applyMiddleware(thunk)
);
if (process.env.NODE_ENV !== 'production') {
let unsubscribe = store.subscribe(() => {
console.log(
"----------------\n",
store.getState(),
"\n----------------"
)
})
}
ReactDOM.render(
<Provider store={store}>
<Board />
</Provider>,
document.getElementById('root')
);