I am trying to add the library redux-injectors from react-boilerplate in my project. However, I get the issue in the image below. My file configureStore is presented below, you can also find it in this repository: https://github.com/guifeliper/example-redux-injectors
What I can do to have the redux-injectors working, I always get this error when I try to apply the library, it seems that my middleware is not in the correct format. Do you have any clue about it?
function createReducer(injectedReducers = {}) {
const rootReducer = combineReducers({
...injectedReducers,
// other non-injected reducers can go here...
});
return rootReducer
}
export default function testingConfigureStore(preloadedState = {}) {
const sagaMiddleware = createSagaMiddleware();
const runSaga = sagaMiddleware.run;
const injectorMiddleware = createInjectorsEnhancer({
createReducer,
runSaga,
});
const middlewares = [injectorMiddleware]; // loggerMiddleware
const middlewareEnhancer = composeWithDevTools(
applyMiddleware(...middlewares)
);
const enhancers = [middlewareEnhancer];
const composedEnhancers = compose(...enhancers);
const store = createStore(createReducer(), preloadedState, composedEnhancers);
return store;
}