これが私の店の作り方です
import { createStore, applyMiddleware } from 'redux';
import thunkMiddleware from 'redux-thunk';
import { routerMiddleware } from 'react-router-redux';
import rootReducer from '../reducers';
const debugware = [];
if (process.env.NODE_ENV !== 'production') {
const createLogger = require('redux-logger');
debugware.push(createLogger({
collapsed: true
}));
}
export default function configureStore(history, initialState) {
const store = createStore(
rootReducer,
initialState,
window.devToolsExtension ? window.devToolsExtension() : f => f,
applyMiddleware(thunkMiddleware, routerMiddleware(history), ...debugware),
);
if (module.hot) {
// Enable Webpack hot module replacement for reducers
module.hot.accept('../reducers', () => {
const nextRootReducer = require('../reducers/index').default;
store.replaceReducer(nextRootReducer);
});
}
return store;
}
しかし、アプリが機能しなくなり、その理由がわかりました。任意の提案をお願いします。