× TypeError:Object(...) 不是函数,使用 redux 和 firebase 创建存储时



以下是我使用的版本:

"redux": "^4.0.5",
"react-redux": "^7.2.0",
"redux-firestore": "^0.13.0"
"firebase": "^7.14.3",
"redux": "^4.0.5",
"react-redux-firebase": "^3.4.0",

我在创建商店时遇到这个错误:

const store = createStore(
rootReducer,
initialState,
compose(
reactReduxFirebase(firebase),
window.__REDUX__DEVTOOLS_EXTENSION__ &&
window.__REDUX__DEVTOOLS_EXTENSION__()
)
);

你能试试这个吗?

import { applyMiddleware, compose, createStore } from 'redux'
import { reducers } from 'redux/reducers'
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
export const store = createStore(reducers, composeEnhancers(applyMiddleware()))

您不想composeredux开发工具。你应该做一个或另一个

相关内容

  • 没有找到相关文章

最新更新