1 | import { createStore, compose, applyMiddleware } from "redux";
|
2 | import gameActionMiddleware from "./game-action-middleware";
|
3 | import { gameMiddleware } from "./game-middleware";
|
4 | import invariant from "redux-immutable-state-invariant";
|
5 | import reducer from "./reducer";
|
6 | import thunk from "redux-thunk";
|
7 |
|
8 | export default function() {
|
9 | const composeEnhancers =
|
10 | window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
|
11 | return createStore(
|
12 | reducer,
|
13 | composeEnhancers(
|
14 | applyMiddleware(invariant(), gameActionMiddleware, thunk, gameMiddleware)
|
15 | )
|
16 | );
|
17 | }
|