DEV Community

Discussion on: How to call APIs in React Redux ?

Collapse
 
jeremymcn profile image
JeremyMcn

Hey, I dont seem to be getting any errors but it just comes up as a blank app in my browser.

I uploaded it in an image and in the configureStore.js the getDefaultMiddleware is crossed out not sure if this has anything to do with it but seems like the only thing not working.

Collapse
 
wexengos profile image
Giovane Nilmer O. S.

It was deprecated. Instead of importing it from "@reduxjs/toolkit" and setting it to the array like that, type your configureStore as:

return configureStore({
reducer,
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(api),
})