2016-07-27 162 views
3

當發送動作是訂單到達減速機和傳奇時的訂單嗎?減速機和傳奇的訂單

我可以依靠它

  1. 首次進入減速
  2. 那麼傳奇?

減速機:

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; 
    } 
    } 

城:

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); 
} 

回答

4

是。行動首先擊中減速器,然後是薩加斯。

+0

Thx,Yassine。在接受答案之前還有一件事。如果它在那裏,你能提供一個鏈接到文檔嗎?或者您的答案是基於您的唯一意見? – zatziky

+1

我寫了圖書館,所以也許這會給一些保證☺ –

+1

但你說得對,它應該在文檔上 –