When dispatching an action is the order when it arrives to a reducer and a saga guaranteed?
Can I rely on that it
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);
}
Yes. The action hits the reducer first then Sagas.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With