Skip to content

Commit

Permalink
Make configureStore middleware argument a lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
steinarb committed Jan 4, 2024
1 parent f84dac6 commit 3d30acb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/frontend/src/components/App.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Routes, Route, NavLink } from 'react-router-dom';
import { HistoryRouter as Router } from "redux-first-history/rr6";
import { configureStore } from '@reduxjs/toolkit';
import { configureStore, Tuple } from '@reduxjs/toolkit';
import createSagaMiddleware from 'redux-saga';
import { Provider } from 'react-redux';
import { createReduxHistoryContext } from "redux-first-history";
Expand All @@ -25,7 +25,7 @@ const {
} = createReduxHistoryContext({ history: createBrowserHistory(), basename });
const store = configureStore({
reducer: createRootReducer(routerReducer),
middleware: [sagaMiddleware, routerMiddleware],
middleware: () => new Tuple(sagaMiddleware, routerMiddleware),
});
sagaMiddleware.run(rootSaga);
const history = createReduxHistory(store);
Expand Down

0 comments on commit 3d30acb

Please sign in to comment.