Hacker News new | past | comments | ask | show | jobs | submit login

RxJS _used to be_ more intuitive, IMO. Around version 5 or so the API changed to use `.pipe` instead of simply chaining operators. Also, some functions were renamed to be (unintentionally, one assumes) more opaque. Such as `flatMapLatest` -> `switchMap`.

Anyhow, there's definitely a learning curve but what it provides is very powerful. It's unfortunate, IMO, that the API has become less approachable over the years.




Although I see how chaining might feel more intuitive, pipeable operators allow for a lot more intuitive and readable composition, making it so you can create reusable and easily tested operators, or even sets of them.

It’s great for what it’s designed for, but you’re not wrong either. Composition can be hard to manage and navigate where a chainable API can be easy to follow and interpret by simply reading the flow.

I think RxJS is actually amazing and I like the path they chose, but I see why it isn’t more widely adopted too. It isn’t nearly as intuitive as it maybe could be.


There's definitely much to be said in favor of simple function composition.

However, I found the API choices odd because in RxJS the `.pipe` operator is, itself, chained rather than being standalone. Using a standalone `pipe`, such as via Ramda or something home-grown worked just fine, so I found it very strange that they mixed the functional composition style with the object-chainable style.

> I see why it isn’t more widely adopted too

I agree that RxJS is amazing, which is why less adoption is unfortunate. So many projects would benefit from RxJS or something like it.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: