3 ms·
> It does not provide any abstraction for re-use of reactive flows, which is essential to large-scale codes based on the paradigm (imagine coding without functi
by gitgud 7y ago
> It does not provide any abstraction for re-use of reactive flows, which is essential to large-scale codes based on the paradigm (imagine coding without functions).
This is wrong. The "pipe()" operator allows you to reuse parts of an Observable flow in RxJS. For example the following function can be used in many different Observable flows:
import { pipe } from 'rxjs/operators';
function checkAuthPipe() {
return pipe(
doSomething(),
runAnotherPipe(),
map(out => out.isAuth)
)
}
This works great at scale too, as pipes can be composed from other pipes...
Good work with the library though, like the documentation and the concept behind the framework, we won't know if something's better until we try it.
- lorean_victor 7y agoWell pipe(), despite being a great extensibility tool, is not a "flow-reuse" abstraction, as it (mostly) just works as a transformer of (mostly) one observable into another. a reactive flow is a directed graph in general and an inverse-tree in RxJS. of course you can simply re-use parts of the inverse tree using functions from multiple observables to one, and the main issue for this is basically the inverse-tree model limitation, as can be observed in appearance of convention-breaking and uncomfortable pipes such as partition.