不确定如何在serializeAction
中将true
设置为enhancer
我尝试添加:
const composeEnhancers =
(window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ &&
(window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
serializeAction: true
});
但是不确定如何将其添加到enhancer
中,我试图这样设置增强器:
const enhancer = composeWithDevTools(applyMiddleware(...middlewares)) && composeEnhancers
运气不好。
这是我当前的设置:
const createStoreWithApi = (api: IApi, initialState?: {}) => {
const middlewares = [
thunkMiddleware.withExtraArgument({
api
})
];
const enhancer = composeWithDevTools(applyMiddleware(...middlewares));
return createStore(rootReducer, initialState!, enhancer);
};
会喜欢一些建议