Uncaught Error: Actions must be plain objects. Use custom middleware for async actions. at Object.performAction (<anonymous>:1:40685) at liftAction (<anonymous>:1:34238) at dispatch (<anonymous>:1:38232) at Object.getSingleSearchResult (index.jsx:207) at t.value (index.jsx:44) at fa (react-dom.production.min.js:5065) at da (react-dom.production.min.js:4826) at ca (react-dom.production.min.js:4800) at va (react-dom.production.min.js:5202) at En (react-dom.production.min.js:1737)
store.js文件:
import { createStore, applyMiddleware, compose } from 'redux';import reducer from './reducer/';import thunk from 'redux-thunk';const win = window;const middlewares = [];if (process.env.NODE_ENV !== 'production') { middlewares.push(thunk); }const storeEnhancers = compose( applyMiddleware(...middlewares), (win && win.devToolsExtension) ? win.devToolsExtension() : (f) => f );export default createStore(reducer, storeEnhancers);
米脂
相关分类