When dispatching an action is the order when it arrives to a reducer and a saga guaranteed?
Can I rely on that it
- first enters the reducer
- then the saga?
Reducer:
function reducer(state, action) {
switch (action.type) {
case 'MY_ACTION':
// decorate action so that an epic doesn't have to take data from store
action.ports = state.itemsModified;
return state;
}
}
Saga:
export function* sagaUpdatePorts() {
yield* ReduxSaga.takeEvery(actions.GRID_PORTS_ASYNC_UPDATE_PORTS, updatePorts);
}
function* updatePorts(action) {
const {response, error} = yield SagaEffects.call(portsService.updatePorts, action.ports);
}