Skip to content

Commit

Permalink
Add fetch middleware with redux toolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
Stardust committed Nov 24, 2022
1 parent 87759f3 commit 6439e23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/redux/store.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { configureStore } from '@reduxjs/toolkit';

import playerReducer from './features/playerSlice';
import { shazamCoreApi } from './services/shazamCore';

export const store = configureStore({
reducer: {
[shazamCoreApi.reducerPath]: shazamCoreApi.reducer,
player: playerReducer,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware().concat(shazamCoreApi.middleware),
});

0 comments on commit 6439e23

Please sign in to comment.