mirror of
https://git.sr.ht/~ashkeel/strimertul
synced 2024-09-20 02:00:49 +00:00
Replace deprecated getDefaultMiddleware usage with new one
This commit is contained in:
parent
8e02ba6fb7
commit
42095e93d6
1 changed files with 4 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit';
|
import { configureStore } from '@reduxjs/toolkit';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import thunkMiddleware from 'redux-thunk';
|
import thunkMiddleware from 'redux-thunk';
|
||||||
import apiReducer from './api/reducer';
|
import apiReducer from './api/reducer';
|
||||||
|
@ -7,12 +7,10 @@ const store = configureStore({
|
||||||
reducer: {
|
reducer: {
|
||||||
api: apiReducer.reducer,
|
api: apiReducer.reducer,
|
||||||
},
|
},
|
||||||
middleware: [
|
middleware: (getDefaultMiddleware) =>
|
||||||
...getDefaultMiddleware({
|
getDefaultMiddleware({
|
||||||
serializableCheck: false,
|
serializableCheck: false,
|
||||||
}),
|
}).concat(thunkMiddleware),
|
||||||
thunkMiddleware,
|
|
||||||
],
|
|
||||||
devTools: true,
|
devTools: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue