【发布时间】:2020-09-10 09:44:22
【问题描述】:
function componentA(sources$) {
return {
dom$: ...,
http$: ...
}
}
function componentB(sources$) {
return {
dom$: ...,
http$: ...
}
}
function main(sources$) {
sources$.props.pipe(
switchMap(props=> {
if (props.showA) {
const sinksA$ = componentA(sources$);
} else {
const sinksB$ = componentB(sources$);
}
})
)
return {
// how to make dom$ and htttp$ ?
}
}
那么如何分别合并两个不同的流呢?
【问题讨论】:
标签: cyclejs