1
我正在寫一個史詩使用redux-observable和我試圖寫一個史詩使用多個過濾器(oftype)。下面給出的是我的示例代碼可重複觀察史詩與多個過濾器
export const landingEpic = action$ => {
console.log('inside landing epic');
return action$.ofType('APPLY_SHOPPING_LISTS').map(() => (
{
type: 'APPLYING_SHOPPING_LISTS',
})
);
return action$.ofType('APPLIED_SHOPPING_LIST'){
//here I want to return something else
}
}
但是我不能在一個史詩中有兩個返回方法嗎?
理想情況下,所有這一切都在一個史詩般的邏輯意義上,所以我想在一個。 –