【发布时间】:2022-01-09 06:10:06
【问题描述】:
我按照 here 中为 next js 设置的 redux 工具包。但是,在原始问题的tsconfig.json、compilerOptions.strict = false 中,我的是true。我遇到的问题是store.js。如果你看demo,在调用configureStore时,reducer有如下问题:
Type '(state: ReturnType<typeof combinedReducer>, action: AnyAction) => any' is not assignable to type 'Reducer<CombinedState<{ counter: CounterState; kanyeQuote: KanyeState; }>, AnyAction> | ReducersMapObject<CombinedState<{ counter: CounterState; kanyeQuote: KanyeState; }>, AnyAction>'.
感谢任何帮助。
【问题讨论】:
标签: reactjs typescript next.js redux-toolkit