RxJs - Stream Analogs in Real Life (2021)

  Рет қаралды 17,518

Decoded Frontend

Decoded Frontend

Күн бұрын

RxJs isn't easy for beginners and definitely requires some shift in the way you think about your data and how this data flows in your application, it is also known as "think reactively". Things like: Why I should always unsubscribe from a stream, why I should keep my data in a stream as much as possible, etc are not always obvious especially when you started with RxJs not so long time ago. Those questions were bothering me for some time until I started looking for stream analogs in real life... and I found it! After that, many things became obvious to me and I started to understand better things I build with RxJs. I hope you will also find it useful. Thank you for watching!
🔥 -15% OFF For All My Courses 🔥
🔥 Use coupon: KZbin_DISCOUNT during the purchase 🔥
⭐ Successful Interview "Angular Interview Hacking" course
courses.decodedfrontend.io/co...
⭐ Become a Pro in Angular Material Theming
bit.ly/angular-material-themi...
⭐ Blazing fast GraphQL Backend just in 1 Day with Hasura Engine
bit.ly/complete-hasura-course
🕒 Time Codes:
00:00:00 - Intro;
00:02:15 - Main Part;
00:11:06 - Outro;
#rxjs #angular #webdevelopment

Пікірлер: 100
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
If you have Angular interview anytime soon, the best way to prepare for it is Mock-Interview! In my new course "Angular Interview Hacking" you can get an option to have a mock interview with Google Developer Expert in Angular and get access to a constantly growing database of the most popular Angular interview questions and detailed answers! Check this out here: courses.decodedfrontend.io/courses/angular-interview-hacking
@denisbielishev
@denisbielishev 2 жыл бұрын
In my opinion it is the best way to explain how it works. I always try to do the same with my colleagues.
@a.c.vermillion
@a.c.vermillion 2 жыл бұрын
Discovered this analogy a year or so ago and since then everything made sense with RxJs, can't look back. Great video!
@patrickcameron2950
@patrickcameron2950 2 жыл бұрын
Great video and great analogy with the pipes. Thank you!
@b1onic98
@b1onic98 2 жыл бұрын
Keep up the good work, I love the visualization, it helps a lot in learning and i get it now. Thank you so much.
@omkarbandkar6065
@omkarbandkar6065 2 жыл бұрын
Your content is always awesome and above average. Keep the content coming ❤️
@critory1049
@critory1049 2 жыл бұрын
This is a very good explanation! Thank you!
@Nabulio85
@Nabulio85 Жыл бұрын
very nice analogy, you are talented
@markusingvarsson2146
@markusingvarsson2146 2 жыл бұрын
Great video! Thank you!
@sanketjain7788
@sanketjain7788 11 ай бұрын
Really grateful to you! Thank you!
@alsaeedfayed2658
@alsaeedfayed2658 11 ай бұрын
This is extremely awesome !!
@vinodsharma-ok1mv
@vinodsharma-ok1mv 2 жыл бұрын
Love your unique way to teach...
@kenanareda2923
@kenanareda2923 2 жыл бұрын
I wish that I knew this amazing video before! Big thank for this richful explanation!
@anjalitanpure6310
@anjalitanpure6310 Жыл бұрын
You have explained in a best possible way using real life example. Watched your most of the videos, you explained everthing really good and in easy manner. Thank you.
@krishnachaitanya102
@krishnachaitanya102 2 жыл бұрын
WOW... What an analogy. Really appreciated for analogy😀
@narainsankar
@narainsankar Жыл бұрын
Wow.. it was the best explanation I ever heard. Thanks for this beautiful content.
@romaknocks7986
@romaknocks7986 2 жыл бұрын
Thanks a lot for your work man!
@AmarSingh-uw1db
@AmarSingh-uw1db 9 ай бұрын
Yes, this helped me so much for understanding rxjs. Gratitude Sir🙌🙌
@RaviKumar-im7kg
@RaviKumar-im7kg 2 жыл бұрын
Awesome way of explanation 🙂 with real time situation 🔥 keep rocking
@dmitryaronov8197
@dmitryaronov8197 Жыл бұрын
It was really nice explanation! Дуже гарно пояснив)
@Valdemar268
@Valdemar268 2 жыл бұрын
Cool and useful explanation, thank you!
@ahmedsokar2909
@ahmedsokar2909 2 жыл бұрын
keep going with this important topic plz.. thanks a lot
@vasylsidelnyk2776
@vasylsidelnyk2776 Жыл бұрын
Best explanation ever seen before.
@titokris5162
@titokris5162 2 жыл бұрын
Great methodology and visualization. To me you nailed and passed the different use cases and above all it's understanding!!! Thanks
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
You're very welcome!
@nickkulmann
@nickkulmann Жыл бұрын
Супер. Этот образ с водой и краном именно так как я сам себе представлял Observables, но Вы конечно все максимально наглядно на схемах нарисовали. Спасибо большое.
@ugochukwuumerie6378
@ugochukwuumerie6378 2 жыл бұрын
Wow amazing stuff. I can literally now visualise the concepts whilst working with rxjs. Thanks for this wonderful video
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
You're very welcome!
@awabalbaalbaky3508
@awabalbaalbaky3508 2 жыл бұрын
You are really amazing, keep going 👍
@dealswithtechtuber2400
@dealswithtechtuber2400 2 жыл бұрын
Yes definitely. Helpful.
@andrewarosario
@andrewarosario 2 жыл бұрын
Amazing examples! Great work!
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Thank you! 😃
@oleksandrvoron_ko580
@oleksandrvoron_ko580 Жыл бұрын
Very well explanation, which ever had seen and also thanks for the today's meeting about Reactive Form)
@DecodedFrontend
@DecodedFrontend Жыл бұрын
Hi Oleksandr! Thank you for you feedback:) glad you liked the today’s talk 😉
@rezaerabby1097
@rezaerabby1097 Ай бұрын
wow, thanks , this is probably the best explanation ever
@DecodedFrontend
@DecodedFrontend Ай бұрын
Glad you like it 😉
@elisaschnabel1811
@elisaschnabel1811 2 жыл бұрын
Great video and great visualization! I will recommend this video to my apprentices!
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Thanks a lot, Elisa!
@krisnarusdiono1304
@krisnarusdiono1304 2 жыл бұрын
the way you represent rxjs stream is BRILLIANT! ... anyone should know your channel buds especially for people who's learning Angular
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Thank you! :)
@balajeebala7810
@balajeebala7810 2 жыл бұрын
You are the best 🔥♥️
@RamKumar-es3mp
@RamKumar-es3mp Жыл бұрын
Really great content .Please do more examples.
@mohamadborzouei4711
@mohamadborzouei4711 Жыл бұрын
Good job. I think this is the simplest way to explain streams.
@rougeassasign
@rougeassasign 2 жыл бұрын
yes !!! More of these please. Streams are still not clear for me.
@malenalucero6473
@malenalucero6473 2 жыл бұрын
I found it really useful! Rxjs is still very difficult for me to understand because I tend to see data as something static that should not be mutated and when I use observables y want them to RETURN something I can work with when the request is finished but that's not how observables work and I know it but I still don't feel comfortable with the concept of streams, so this was great and I hope you can make more videos with real usage examples of Rxjs in Angular. Thank you!
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Thank you for your feedback! :) I am glad to hear that you liked this idea. If audience finds this way of rxjs explanation also useful I will do more videos about some specific rxjs operators using analogs from real life :)
@Manuel-fp6ni
@Manuel-fp6ni Жыл бұрын
great job! thank you from Perú!!!
@bukanaka
@bukanaka 2 жыл бұрын
Отличный пример. До этого визуализировал себе поток как массив с данными, но с водопроводной трубой всё стало ещё глубже к пониманию.
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Рад слышать :) массив данных тоже хороший пример на самом деле.
@krunalkamble1833
@krunalkamble1833 2 жыл бұрын
Excellent
@Rajesh_Me
@Rajesh_Me 2 жыл бұрын
Crazy and realistic example of water connection in house building. Always loved your content. const stream$ = of('water') 😀
@otmanm4095
@otmanm4095 2 жыл бұрын
Greeaaaat video !
@Moewie
@Moewie 2 жыл бұрын
insanely good example
@RAJU9622
@RAJU9622 2 жыл бұрын
Excellent explanation
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Glad you liked it
@ariMuayad
@ariMuayad 2 жыл бұрын
Thank you, always with the best content. You're spoiling your viewers. Can you create deep dipe videos into rxjs.
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Haha :) Hope not so much... Regarding rxjs deep dive not sure so far but let's see ;)
@halynaua
@halynaua 5 ай бұрын
wow:) thank you
@user-yr9mz4lg8z
@user-yr9mz4lg8z 5 ай бұрын
nice explanation, can you explain in detail about ag-grid
@amar-iby
@amar-iby 2 жыл бұрын
The best !
@aleksandrm3466
@aleksandrm3466 2 жыл бұрын
Thank you very much, super topic. It would be very interesting to see more examples with operators. For example, you can start with simple examples of processing events and sending data... Preferably real examples from projects.
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Next vid will be exactly about that, so stay tuned ;)
@swapnasaritnayak2569
@swapnasaritnayak2569 2 жыл бұрын
Awesome .
@SheriffZmroka
@SheriffZmroka Жыл бұрын
Amazing video. But I would love to see it in the form of an article. Well, more deeply about mental models.
@georgimollov
@georgimollov 2 жыл бұрын
I have always imagine streams like electricity flow through power lines but struggled with operators. Watching your video kinda make me think for operators like electrical elements that transfor the electricity. But realized maybe pipes and water is more helpful. Good video as always
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Yeah.. electricity is also fine but agree that it is harder :) In order to explain operators there, you need some knowledge about transistors, resistors, etc which might act as operators but I am not good in this area, so I might be wrong 😀
@innocentmazando3808
@innocentmazando3808 2 жыл бұрын
This is one perfect description of streams, if only I learnt this earlier I would have suffered less :) Thanks @Decoded Froontend
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Thanks for feedback:) Glad that it was helpful!
@mrthefankyy
@mrthefankyy 2 жыл бұрын
Need a course about RxJs with your explanation ;)
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
got you :)
@pranavsarang
@pranavsarang 2 жыл бұрын
Please make video on how actually shadow dom works generally in angular and how it is different from real dom and virtual dom
@syedfamily1
@syedfamily1 2 жыл бұрын
thanks x 100
@alexshubin1
@alexshubin1 11 ай бұрын
Funny! And I was imagine marble diagrams like there is a gun that shots with portion of data )))
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
How do you imagine streams? Do you also use analogs from real life or for you marble diagrams are just enough? :)
@p.s29
@p.s29 2 жыл бұрын
Yeah. I use lake as a reference. Hehe. :)
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
yeeeah! Good one as well ;)
@user-ny4yt1kf9v
@user-ny4yt1kf9v 2 жыл бұрын
I think about potato, when write in rxjs, is it fine?
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
@@user-ny4yt1kf9v absolutely 😄
@Moelgaard85
@Moelgaard85 2 жыл бұрын
The one that did if for me back in the days was thinking of it as subscribing to a newsletter. They well keep arriving for example once a week as long as I am subscribed. When i unsubscribe they stop arrive. And if nobody is subscribed to the newsletter, nothing is sent out / nothing happens.
@filipslezak5152
@filipslezak5152 2 жыл бұрын
I was just implementing debounced search in react with rxjs. What is this magical timing :d
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
It was also one of the first things I have implemented with rxjs 😄
@manuff11
@manuff11 2 жыл бұрын
Love u bro
@vimhub
@vimhub 2 жыл бұрын
I miss your content sir..
@F.C.Poet_
@F.C.Poet_ 2 жыл бұрын
it helps )
@yapayzeka
@yapayzeka 2 жыл бұрын
7:15 I think release air effects stream. not good example. maybe you measure the water temperature and log it. that would be a very proper "tap" case.
@AnamikaSingh-qf8su
@AnamikaSingh-qf8su 11 ай бұрын
When do one use Promise vs Observables
@denns0r
@denns0r 2 жыл бұрын
That was actually great for understanding RXJS! But I somewhat disagree with the Promise addition. Most of the time I simply want to get or post data to an api. I do not need a stream for that, because it's a one-time thing. Unless I want to be able to cancel the ongoing request of course (which is also possible with promises, but kind of ugly). In my applications, there is not much data actually that is "streaming" into my application. It's more "get-data, show data, change data, send data" scenarios. So I end up in using Promises, Promise.all() and using async/await which makes my code way more synchronously readable than using streams. But that's maybe only my perspective 🤷‍♂️
@p.s29
@p.s29 2 жыл бұрын
Yeah, I also agree with using async/await when you know the observable will emit single data (httpClient, etc). It makes the code more readable and the control is returned to the main function after the sub function is executed..
@GrupoSSMC
@GrupoSSMC 7 ай бұрын
The video is very interesting, but how can I apply this if I have an endpoint made with webflux that returns a content-type of text/event-stream?
@JmonteroArg
@JmonteroArg 2 жыл бұрын
I really like this mental model for understanding RxJS. However it becomes very difficult to visualise some of the advanced operators using the water pipe analogy. Maybe for that kind of scenarios is better o think about it as a factory conveyor belt with parts (parts being the water and the conveyor belt being the pipe) that require special threatments and have time constraints, etc.
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Hi Joseph! You are absolutely right, some other models describe better other parts of rxjs. I also use many others like “the road and cars” or the one you described as well :) the model from the video was just the fist one I recognized and which helped me the most and after that things got easier:)
@rahultej8352
@rahultej8352 Ай бұрын
❤❤❤
@zzing
@zzing 2 жыл бұрын
I think using the $ on waterPipes$ would be out of convention given it isn't actually an observable.
@Rob34570
@Rob34570 2 жыл бұрын
I suspect he added .subscribe later on and didn’t remove the $, as now it would be returning the subscription object as you pointed out.
@bukanaka
@bukanaka 2 жыл бұрын
Не оставляйте краник открытым)
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
:D
@SergeyLevandovski
@SergeyLevandovski 27 күн бұрын
Promise = grab bucket and get water from well )
@bukanaka
@bukanaka 2 жыл бұрын
Граф Ке Ле 😂😂
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
Можно уже нарезку делать из переводов 😂
@LeiferMendez
@LeiferMendez 2 жыл бұрын
RxJs Zip - Real-Life Analog of ZIP operator (Reactive Dürüm, 2021)
13:55
Hot vs Cold Observable in RxJs (2021)
15:06
Decoded Frontend
Рет қаралды 26 М.
1 or 2?🐄
00:12
Kan Andrey
Рет қаралды 51 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 4,3 МЛН
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 66 МЛН
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
RXJS Real Examples - 1.  How to Use Observables to Manage User Data
23:02
TOP 6 Mistakes in RxJS code
18:35
Decoded Frontend
Рет қаралды 14 М.
RxJs switchMap vs mergeMap - Intro to Flattening Operators (2021)
25:44
Decoded Frontend
Рет қаралды 28 М.
Angular Dependency Injection in Depth - Resolution modifiers (2021)
14:39
RxJS Scan Operator - How to Manage the State
16:33
Decoded Frontend
Рет қаралды 9 М.
TOP 5 Angular Interview Questions and Answers (for experienced, 2020)
21:50
RxJs Operators - ExhaustMap vs concatMap (2021)
11:17
Decoded Frontend
Рет қаралды 10 М.
RxJS Top Ten - Code This, Not That
14:44
Fireship
Рет қаралды 252 М.
Angular dependency injection in depth -  Dependency providers (2021)
17:19
I only ever use *these* RxJS operators to code reactively
25:25
Joshua Morony
Рет қаралды 122 М.
Simple maintenance. #leddisplay #ledscreen #ledwall #ledmodule #ledinstallation
0:19
LED Screen Factory-EagerLED
Рет қаралды 29 МЛН
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 6 МЛН
Clicks чехол-клавиатура для iPhone ⌨️
0:59
Здесь упор в процессор
18:02
Рома, Просто Рома
Рет қаралды 239 М.