我的减速器有以下代码:
import { Reducer, combineReducers } from 'redux';
import { routerReducer } from 'react-router-redux';
import { firebaseReducer } from 'react-redux-firebase';
import { firestoreReducer } from 'redux-firestore';
const reducers: Reducer<ApplicationState> = combineReducers<ApplicationState>({
firebase: firebaseReducer,
firestore: firestoreReducer,
router: routerReducer
});
export { reducers };
我非常关注可以在这里找到的教程
然而firestore
,reducer 抱怨以下消息:
Argument of type '{ firebase: typeof firebaseReducer; firestore: typeof firestoreReducer; router: Reducer<RouterSta...' is not assignable to parameter of type 'ReducersMapObject'.
Property 'firestore' is incompatible with index signature.
Type 'typeof firestoreReducer' is not assignable to type 'Reducer<any>'.
Type 'typeof firestoreReducer' provides no match for the signature '(state: any, action: AnyAction): any'.
可能是什么问题以及如何解决?