当调度动作是它到达减速器并保证传奇时的顺序?
我能依靠吗?
减速器:
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;
}
}
Run Code Online (Sandbox Code Playgroud)
佐贺:
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);
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1315 次 |
最近记录: |