Redux
0
Вклад в тег
export const updateData: Middleware =
(store) => {
const dispatch = store.dispatch as AppDispatch
return (next) =>
(action: PayloadAction) => {
if (action.type.startsWith('login/')) {
dispatch(fetchOffersAction())
}
return next(action)
}
}