Remove listenerMiddleware
This commit is contained in:
parent
5317050679
commit
7f563d8c73
@ -1,9 +0,0 @@
|
||||
import { createListenerMiddleware } from '@reduxjs/toolkit';
|
||||
import type { TypedStartListening } from '@reduxjs/toolkit';
|
||||
import { AppDispatch, RootState } from 'app/store';
|
||||
|
||||
export const listenerMiddleware = createListenerMiddleware();
|
||||
export type AppStartListening = TypedStartListening<RootState, AppDispatch>;
|
||||
|
||||
export const startAppListening =
|
||||
listenerMiddleware.startListening as AppStartListening;
|
@ -1,5 +1,4 @@
|
||||
import { configureStore } from '@reduxjs/toolkit';
|
||||
import { listenerMiddleware } from './listenerMiddleware';
|
||||
import { pokedexSlice } from 'features/Pokedex/pokedexSlice';
|
||||
import { filterSlice } from 'features/Filters/filterSlice';
|
||||
import { filterApi } from 'features/Filters/filterApi';
|
||||
@ -14,10 +13,7 @@ export const store = configureStore({
|
||||
[filterApi.reducerPath]: filterApi.reducer,
|
||||
},
|
||||
middleware: getDefaultMiddleware =>
|
||||
getDefaultMiddleware().concat(
|
||||
filterApi.middleware,
|
||||
listenerMiddleware.middleware,
|
||||
),
|
||||
getDefaultMiddleware().concat(filterApi.middleware),
|
||||
devTools: true,
|
||||
});
|
||||
|
||||
|
@ -4,7 +4,6 @@ import { filterSlice } from './filterSlice';
|
||||
import { configureStore } from '@reduxjs/toolkit';
|
||||
|
||||
import { AppStore } from 'app/store';
|
||||
import { listenerMiddleware } from 'app/listenerMiddleware';
|
||||
import { TypeListResponseData } from 'features/Pokedex/types/api';
|
||||
|
||||
let store: AppStore;
|
||||
@ -18,10 +17,7 @@ describe('filterApi', () => {
|
||||
[filterApi.reducerPath]: filterApi.reducer,
|
||||
},
|
||||
middleware: getDefaultMiddleware =>
|
||||
getDefaultMiddleware().concat(
|
||||
filterApi.middleware,
|
||||
listenerMiddleware.middleware,
|
||||
),
|
||||
getDefaultMiddleware().concat(filterApi.middleware),
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -11,7 +11,6 @@ import { configureStore } from '@reduxjs/toolkit';
|
||||
import { pokedexSlice } from 'features/Pokedex/pokedexSlice';
|
||||
import { filterSlice } from 'features/Filters/filterSlice';
|
||||
import { filterApi } from 'features/Filters/filterApi';
|
||||
import { listenerMiddleware } from 'app/listenerMiddleware';
|
||||
|
||||
let store: AppStore;
|
||||
|
||||
@ -24,10 +23,7 @@ describe('pokedex Component', () => {
|
||||
[filterApi.reducerPath]: filterApi.reducer,
|
||||
},
|
||||
middleware: getDefaultMiddleware =>
|
||||
getDefaultMiddleware().concat(
|
||||
filterApi.middleware,
|
||||
listenerMiddleware.middleware,
|
||||
),
|
||||
getDefaultMiddleware().concat(filterApi.middleware),
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user