我自己的代码中没有发现任何缺陷,我收到错误
未捕获的TypeError:(0,_reactRedux.applyMiddleware)不是 功能
import { applyMiddleware, createStore } from 'react-redux'
import { promiseMiddleware } from './middleware'
const defaultState = {
appName: 'conduit',
}
const reducer = (state = defaultState, action) => {
switch(action.type) {
case 'HOME_PAGE_LOADED':
return { ...state, articles: action.payload.articles }
}
return state
}
const middleware = applyMiddleware(promiseMiddleware)
const store = createStore(reducer, middleware)
export default store
有任何疑问是什么问题?