Using RTK Query with Entity Adapter and TypeScript
Here is the code for my store.ts: import { configureStore } from “@reduxjs/toolkit”; import { apiSlice } from “./api/apiSlice”; import { useDispatch, useSelector } from “react-redux”; export const store = configureStore({ reducer: { [apiSlice.reducerPath]: apiSlice.reducer, }, middleware: (getDefaultMiddleware) => { return getDefaultMiddleware().concat(apiSlice.middleware); }, devTools: true, }); export type RootState = ReturnType<typeof store.getState> export type AppDispatch […]