I am unable to set up redux-observable in my current project. So far, I've been using redux-toolkit for everything redux related, but now when I try to add redux-observable I get this error:
This is how I set it up:
function logEpic(actions) {
return actions.pipe(tap(console.log), ignoreElements())
}
const epicMiddleware = createEpicMiddleware()
export const store = configureStore({
reducer: {
data: dataReducer,
dashboard: dashboardReducer,
error: errorReducer,
login: loginReducer,
authentication: authenticationReducer,
},
middleware: getDefaultMiddleware =>
getDefaultMiddleware().concat(epicMiddleware),
})
epicMiddleware.run(logEpic)