【发布时间】:2019-05-16 20:03:12
【问题描述】:
saga 新手,我在我的根 saga 中使用它:
function* rootSaga() {
yield [
cycleRoot(), // fetches root
cycleChain(), // fetch chain
cycleChatBadge(), // fetches badge
watchNotifications(), // navigate on ROOT_DONE
watchNavigation(), // listen to navigation changes
watchAppState(), // background/foreground
watchConnection(), // connection chages
];
}
它有效。但是,我已经看到使用以下示例的示例:
function* rootSaga() {
yield fork (cycleRoot);
yield fork (cycleChain);
...
}
点燃根传奇时这两者有什么区别?
【问题讨论】:
标签: redux redux-saga