Currently i am working on migration from angular 5 to 6. While updating to redux 4 i am getting error as store.getState() is not a funtion
export interface IAppState {
source1: IEmployee[],
source2: IEmployee[],
}
export type FSAction = FluxStandardAction<any, MetaData | null | number>;
this is the code for epic middleware. Here i am facing issue as store.getState() is not a function while updating to redux 4
employeeValues_Epic: Epic<FSAction, IAppState> = (action$, store) => action$
.ofType(APP_Actions.ActionTypes.APP_EMPLOYEE_VALUES).pipe(
switchMap(data => {
let state1: IEmployee[] = [];
try {
console.log("in All domain iteration");
state1 = store.getState().source1.state;
} catch (error) {
console.error(error);
}
return observableFrom(state1);
}));`
Currently i am working on migration from angular 5 to 6. While updating to redux 4 i am getting error as store.getState() is not a funtion