The secret to understanding piped operators in RxJS (Advanced)

preview_player
Показать описание

In this video, we talk about why considering the subscription flow of RxJS operators upward can make understand what is going on in streams easier.

0:00 Introduction
0:36 Downward flow
2:51 Upward flow
4:25 Nested pipes
5:36 A practical example

#ionic #angular

Рекомендации по теме
Комментарии
Автор

Hey Josh, keep up the amazing work! I work with Angular all the time and Im still learning a lot of valuable information from your videos. They're great quality and always easy to understand.

fullstackburger
Автор

This is the best free software Ive seen. Respect.

mohammadjabr
Автор

Very high quality video! Thanks a lot!

dafengxu
Автор

great approach with drawing and explanations, I could understand everything without stopping video, thanks!

kanstantsinmalikau
Автор

IT'S ALWAYS THE UNDERRATED VID THAT'S LEGIT! THANK YOU! <3

mvip
Автор

You should do a RxJs course. I’d happily pay £100 for 4 hour course similar to universal courses

additionaddict
Автор

After having drunk the RxJS operator Kool-aid for some time, I have found that RxJS operators make my code more difficult to debug, unit test, and reason about. This is especially true when incorporating operators that combine streams.

pchasco
Автор

Love the video! Clear and concise, even though sometimes RxJS operations can be very confusing. Also, what is on your terminal background? Are those Vim commands and how did you get them to show up on your terminal background?

nikolitilden
Автор

So, now you know you should just put the StartWith op. at the end of the pipe and you don't need to concatenate the default value in front of the source stream, like in the last video. I reckon that's where this is coming from? :)
Good explanation, really liked this approach of following the subscriptions.

gaborkonstanzer
Автор

Nice video once again. Just a question do you really need of() operation on the switchMap line ?Since it is alrady observable.

easy-draw
Автор

thank you!!! video liked and u got a well deserved sub from me!!!!

syedaligll
Автор

Cool video, but I think it just made me a bit more confused, haha.

I have a possible video topic idea... This situation comes up for me all the time and I'm sure I'm not using RxJS correctly: To avoid subscribing to an Observable I do the usual piping, and have that assigned to something like myObservable$. I can then async pipe it to the template. BUT very often I also need the result of that in my TS component code (for whatever reason). To do that, inside the pipe, I use the tap() operator, and in there assign the value to a local variable in the component. Then that variable can be used in some TS logic. But this feels so dirty, especially since I feel forced into doing this very often. I feel like it would be cleaner if I just subscribed and then in the "done" block assign to my local variable. (then deal with a manual unsubscribe). Is what I'm doing considered "okay"? Is there a better way? I think this would be an interesting video topic. :)

JBuchmann
Автор

And when you have a filter operator inside? Still subscribed to the last one?

dlemb
Автор

How could you implement a loop in this case?

culttm
Автор

Not you're weird, but the syntax. Anyway, multiple nesting is nowadays spaghetti code.

zoltanboros
Автор

I still beleive promises are much more cleaner and clearer

tntg