1
0
Fork 0
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:
Ash Keel 2021-11-22 10:13:11 +01:00
parent 8e02ba6fb7
commit 42095e93d6
No known key found for this signature in database
GPG key ID: BAD8D93E7314ED3E

View file

@ -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,
}); });