I had such a problem that, store not dispatch success action, in all other cases, everything works for me, but in this it does not
My actions
export const getPrintingEditions = createAction(
PrintingEditionActions.GET_PRINTING_EDITIONS,
props<{paginationQuery?: PaginationQuery, filter?: PrintingEditionFilter}>()
)
export const getPrintingEditionsSuccess = createAction(
PrintingEditionActions.GET_PRINTING_EDITIONS_SUCCESS,
props<PagedResponce>(),
)
export const getPrintingEditionsFailure = createAction(
PrintingEditionActions.GET_PRINTING_EDITIONS_FAILURE,
props<{error: any}>()
)
My effect
getPrintingEditions$ = createEffect(() => this.actions$.pipe(
ofType(printingEditionActions.getPrintingEditions),
mergeMap(action => this.printingEdition.getPrintingEditions(
action.paginationQuery,
action.filter
).pipe(
map(pagedResponce => printingEditionActions.getPrintingEditionsSuccess(pagedResponce)),
catchError(err => of(printingEditionActions.getPrintingEditionsFailure(err)))
)
)))
Reducer code
on(printingEditionActions.getPrintingEditionsSuccess, (state, action) =>
peAdapter.setAll(action.data, {
...state,
pageNumber: action.pageNumber,
pageSize: action.pageSize,
nextPage: action.nextPage,
previousPage: action.previousPage,
})
),
I'm use entity state for manage entities
When you don't do anything on the page, you wait, it starts to glitch.
I think, problem not in actions, effect and reducer, but I'm don't understand where problem and how solve it
link to repository on github. This code locale in store https://github.com/mrshk-vv/book-store-client