You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
460 B
18 lines
460 B
3 years ago
|
import { applyMiddleware, createStore } from "redux";
|
||
|
import logger from "redux-logger";
|
||
|
import promise from "redux-promise";
|
||
|
import trunk from "redux-thunk";
|
||
|
import rootReducer from "../reducers";
|
||
|
|
||
|
const plugins = [promise, trunk];
|
||
|
|
||
|
if (
|
||
|
process.env.NODE_ENV === "development" &&
|
||
|
process.env["REACT_APP_LOG_REDUX_EVENT"] !== "false"
|
||
|
) {
|
||
|
plugins.push(logger);
|
||
|
}
|
||
|
|
||
|
const store = createStore(rootReducer, applyMiddleware(...plugins));
|
||
|
export default store;
|