× TypeError: Object(...) is not a function, while creating store using redux and firebase
× TypeError: Object(...) is not a function, while creating store using redux and 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()))
您不想 compose
redux 开发工具。你应该做一个或另一个
这些是我正在使用的版本:
"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()))
您不想 compose
redux 开发工具。你应该做一个或另一个