Rxjs Streams in Angular - Normalizing Data (Map and Pipe Operator)

  Рет қаралды 27,704

Monsterlessons Academy

Monsterlessons Academy

Күн бұрын

Пікірлер: 78
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 жыл бұрын
WATCH NEXT: Beginner's RxJS Tutorial: Dive Deep with RxJS Crash Course - kzbin.info/www/bejne/r3vHmWSVe8enoLcsi=qhsqP7Eu3Nd7_hIUi
@manojkarthik6158
@manojkarthik6158 2 жыл бұрын
He may be talking like a robot but the content is extraordinary.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Thank you!
@ohmegatech666
@ohmegatech666 3 ай бұрын
A robot that's running low on batteries lol. I put it on 1.5x speed
@TauwinKul
@TauwinKul 2 жыл бұрын
Your intro and outro are world class. Not to mention the content of your short videos.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Thank you!
@charleso6513
@charleso6513 2 жыл бұрын
Very well explained. Its difficult sometimes finding a clean explanation of these functions but this one helped me actually understand it properly. Thank you!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Here is a follow up for you on this topic kzbin.info/www/bejne/aIWWd2iKm9eMras
@ayush03d
@ayush03d 3 жыл бұрын
Thank you so much! I have seen around 10 videos on this topic and this is the best video that has cleared my doubt! Subscribed!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
Glad it was helpful!
@mybootscamewithoutstraps
@mybootscamewithoutstraps Жыл бұрын
I can see that you've made improvements over the years with your videos to work on how you use inflection in your voice. It still feels really robotic when listening to the content, but you definitely have concise lessons that get things across the way they need to be.
@MonsterlessonsAcademy
@MonsterlessonsAcademy Жыл бұрын
Wow, thank you!
@mybootscamewithoutstraps
@mybootscamewithoutstraps Жыл бұрын
I think once you really get down the inflections of your voice to be more natural and uplifting, your stuff should really grow a lot. When an instructor is easy to listen to and has a nice speaking rhythm, it makes it way easier to absorb the content and learn.@@MonsterlessonsAcademy
@CatEatsDogs
@CatEatsDogs Жыл бұрын
@@mybootscamewithoutstraps I would listen to you speak any language that is not your native one. Slavic for example. And how you use inflections in your voice.
@leandrodossantos9160
@leandrodossantos9160 2 жыл бұрын
Bro, I found this a little later but it is a great explanation, thanks man!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Glad to hear it!
@omar-elgammal
@omar-elgammal 2 жыл бұрын
such a great Explanation ! keep up the great work
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Thanks, will do!
@pgc1721
@pgc1721 3 жыл бұрын
Perfect explanation. Just top notch.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
Glad you liked it!
@ilkerberkeelcioglu1130
@ilkerberkeelcioglu1130 2 жыл бұрын
Very well and detailed explained. Thank you, it was very helpful!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Glad it was helpful!
@girish2555
@girish2555 2 жыл бұрын
Crystal clear 🔥
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Thank you!
@Georgii1212
@Georgii1212 Жыл бұрын
Hello! Thanks for the excellent tutorial. One question. In the UserService, if I want to implement a method that returns Observable of only one user, the youngest one, what would be the code ? The important thing is that I want the service to return the observable of this user...So sorting by age would be done in the service, on the list of users.
@MonsterlessonsAcademy
@MonsterlessonsAcademy Жыл бұрын
You can just call sorting by age and take first element inside map of rxjs with Javascript
@Georgii1212
@Georgii1212 Жыл бұрын
@@MonsterlessonsAcademy thanks a lot for quick answer. So, we keep the same rxjs functions pipe() and map(), that you have described for getUsers(), and just adapt the callback function inside map. I thought was necessary to use switchMap instead of map, but I was obviously wrong. And I guess the signature of this method would be getYoungestUser(): Observable
@MonsterlessonsAcademy
@MonsterlessonsAcademy Жыл бұрын
@@Georgii1212 Yeap
@dipabhow4630
@dipabhow4630 3 жыл бұрын
Very good video for map operator... thanks for it man...
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
I'm happy that I like it!
@MrCyurasys
@MrCyurasys 2 жыл бұрын
Your video is very good. I have only one mention: In method getUsers you could have used return users.map(user => user.age += ' years old') I dont think it is needed to return a new object but just return the same one and modify only the properties you need
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
That is possible but it is safer to write immutable code and never mutate any properties (which I typically recommend to do). Then you never get the situation that your code is suddenly changed from random place.
@abdulaziz7013
@abdulaziz7013 3 жыл бұрын
excellent sir, very helpful real-time example
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
Glad it was helpful!
@raulherbert
@raulherbert 2 жыл бұрын
great explanation! tks!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Glad it was helpful!
@luca-rw7ss
@luca-rw7ss 3 жыл бұрын
Very Very good explanation! Thank you.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
Glad it was helpful!
@satviksharma4897
@satviksharma4897 3 жыл бұрын
Very well explained
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
Glad it was helpful!
@adhivenkatesh3431
@adhivenkatesh3431 2 жыл бұрын
Hi Olex , its great video , is there any videos for angular chatbot with room , videos need for tips in angular
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Hi Adhi, I have a new couse in Angular, Typescript, Socket io, Mongodb, Express where we build trello clone. Although it is not a chatbot but the websockets concepts are similar monsterlessons-academy.com/courses/build-fullstack-trello-clone-websocket-socket-io
@BGivo
@BGivo 2 жыл бұрын
One thing I don't quite understand. When you "subscribe" to a stream, and the value in the stream changes, would the component that was subscribed to it automatically render on its own? (or is this something you need a BehaviourSubject for?)
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Subscribe doesn't do anything with component. Only changing of the property will render template again. You typically use subscribe to call some other function. If you just need to rerender stream property it's better to use async pipe {{foo$ | async }}
@BGivo
@BGivo 2 жыл бұрын
@@MonsterlessonsAcademy Sorry I should have been more clear. Even with the async approach, if the value in the stream changes, would the component that has the async pipe automatically rerender with the new value?
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
@@BGivo yes exactly. That is the whole point of using RxJS with Angular
@BGivo
@BGivo 2 жыл бұрын
@@MonsterlessonsAcademy Thank you. So if that's the case, what's the point of the BehaviourSubject then?
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
@@BGivo To create a stream where you can subscribe and update it anytime by using next.
@FMAlmeidaLeite
@FMAlmeidaLeite 2 жыл бұрын
Me ajudou muito, obrigado! 😁
@MatheusSantos-rh5jo
@MatheusSantos-rh5jo 2 жыл бұрын
Thanks sir! Help me a lot!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Glad to help!
@karnpratapsingh8860
@karnpratapsingh8860 3 жыл бұрын
very nice explanation.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
Glad you liked it!
@leonidesmuguercia4211
@leonidesmuguercia4211 2 жыл бұрын
Nice 👍!!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
Thanks!
@kshitijbhatt11
@kshitijbhatt11 3 жыл бұрын
Is the online course still maintained? The website didn't look really responsive hence I am skeptical. But this is the best video i have seen on rxjs streams for angular. Really interested in advance angular course if it's still maintained.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
You mean Angular NgRx course? Yes it is. It works on Angular 13 with 1 ngrx change where we inject it in other way which I mention in the course. I'm open to changes on website just send me an email with screenshot what is not responsive and I will check.
@HM_Milan
@HM_Milan 3 жыл бұрын
Thank you
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
You're welcome!
@denns0r
@denns0r 2 жыл бұрын
I don't see why http requests are observables. Observables can only have ONE observer, and HTTP requests will complete or error after they are executed. Yes, I can combine multiple observables and mutate their data, but I can do that with promises as well ... native. Plus I can simply await one or multiple promises that can be fired sequentially or all at the sime time. And I do not have to store subscriptions to unsubscribe if my component destroys itself. Subjects can have multiple observers and they can emit different values over time, okay I can see the use of that, but I don't understand why http requests are observables. The ONLY usecase, where observables are superior in http requests is when I can use switchmap to cancel them. But for that I need an input stream as well ... 🙄
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
I think you need to address your questions to Angular team and it's architecture. It is what it is. Using Angular with streams in the way how Angular was planned is easier that fight with bugs when using Angular in a way which was not intended.
@yuraflokadrift
@yuraflokadrift Жыл бұрын
Друже, ти українець?
@HoNow222
@HoNow222 3 жыл бұрын
Very cool angular videos!! But please you should think about using a more friendly IDE like VScode :)
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
Unfortunately it's not friendly for me and I can't be as productive there as I'm with Vim
@amannegi8256
@amannegi8256 3 жыл бұрын
awesome video , but try smiling sometimes.. :)
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
I will try my best
@auchucknorris
@auchucknorris 3 жыл бұрын
at 10 minutes is exactly why i dislike typescript, front end code your constantly manipulating data, so much extra work, for a benefit that doesn't matter on front end code, ur not going to ruin a database so its only purpose is to throw errors
@aakashpoojary3968
@aakashpoojary3968 Жыл бұрын
Hence backend helps a lot in such cases. If an api sends a nice, clear outputs there will be no need to transform data
@jannickbreunis
@jannickbreunis 6 ай бұрын
Great video. Saw pipe() and map() everywhere but now I actually understand what they do. Your video about other methods is a great follow up: kzbin.info/www/bejne/aIWWd2iKm9eMras
@MonsterlessonsAcademy
@MonsterlessonsAcademy 6 ай бұрын
You are totally right!
@Nafiganado
@Nafiganado 3 жыл бұрын
This guy looks like Christopher Walken
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
Lol I can see similarities. I hope to look that good when I get older :)
@dreamether7808
@dreamether7808 2 жыл бұрын
lol does this dude have a soul? he sounds dead inside
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 жыл бұрын
I sold my soul to get such awesome programming skills.
@surendra_tarai
@surendra_tarai 2 жыл бұрын
its a dead man
Angular Routing - Learn Needed Basics
14:40
Monsterlessons Academy
Рет қаралды 3,7 М.
Angular unsubscribe, Angular async pipe, RxJS subscribe - Avoid Memory Leaks
11:29
Counter-Strike 2 - Новый кс. Cтарый я
13:10
Marmok
Рет қаралды 2,8 МЛН
«Жат бауыр» телехикаясы І 26-бөлім
52:18
Qazaqstan TV / Қазақстан Ұлттық Арнасы
Рет қаралды 434 М.
Война Семей - ВСЕ СЕРИИ, 1 сезон (серии 1-20)
7:40:31
Семейные Сериалы
Рет қаралды 1,6 МЛН
"Идеальное" преступление
0:39
Кик Брейнс
Рет қаралды 1,4 МЛН
Change Detection in Angular - You Project Is 20x Slower!
15:16
Monsterlessons Academy
Рет қаралды 74 М.
RxJS tutorial in practical way (with pipe, map, filter, tap) 🔥
13:13
TheAngularCoder || Gourav
Рет қаралды 18 М.
Async Pipe Is Broken in Angular
9:08
Monsterlessons Academy
Рет қаралды 10 М.
The Biggest Mistake Intermediate React Developers Make
18:32
Cosden Solutions
Рет қаралды 31 М.
RXJS Real Examples - 1.  How to Use Observables to Manage User Data
23:02
RxJS Top Ten - Code This, Not That
14:44
Fireship
Рет қаралды 257 М.
Counter-Strike 2 - Новый кс. Cтарый я
13:10
Marmok
Рет қаралды 2,8 МЛН