5 ms·
I feel like most of the RxJS functionality doesn't have a real use case. At the end of the day, you are doing an async call, something axios handles just fine.
by throw1234651234 3y ago
I feel like most of the RxJS functionality doesn't have a real use case. At the end of the day, you are doing an async call, something axios handles just fine. I did a bunch of presentations on RxJS, so I understand it fairly well, but I have never used it past basic API calls "irl".
- codethief 3y ago> I feel like most of the RxJS functionality doesn't have a real use case. I disagree. I have implemented several use cases using RxJS which would have otherwise been significantly more difficult to solve. (Think timing parallel sequences of animations und other UX effects etc.)
- andix 3y agoRx can be awesome for some complex problems. But I’m angular it’s everywhere and often makes things much more complex than they have to be.
- whycombagator 3y agoSeeing as it’s often. Do you have a single example?
- throw1234651234 3y agoI am the guy who doesn't use it, but people used to recommend using it for "event-driven architecture on the front end" - clicking a button is an event, typing text is an event, hovering over something is an event, and there could be multiple subscribers. The example use-cases people give are really contrived. The functional crowd also pushed it. Again, to me it's another trend like Web Components that never really took of in the mainstream. Yes, people use Web Components and RxJS' full power, but it's not something to learn when you are looking for practical, widely applicable skills. If anyone still cares about this, here is a helpful site that you can understand without knowing anything about RxJS: https://rxmarbles.com/ https://rxmarbles.com/
- steve_adams_86 3y agoI’ve rarely seen it used beyond very, very basic things in Angular projects (and I’ve always wished I saw more of it, actually). Maybe we just work on totally different kinds of projects.
- tcfhgj 3y agoI am using ngrx, and you get using rxjs a lot in effects.
- 88913527 3y agoThe biggest benefit, which I haven't found much of a practical need for, is you can continue to emit 1...n times, whereas a Promise only resolves once. Since it's an indeterminate number of times, you need to subscribe and unsubscribe to prevent memory leaks, so it just adds more overhead. Use a Promise if you only need to resolve once.
- traviswt 3y agoGenerators, yield, Iterator?
- JenrHywy 3y agoIf you get on board with it fully in Angular, rxjs + async pipes can make things pretty clean.