switchMap vs concatMap vs mergeMap ... Oh My!

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

Комментарии • 76

  • @luizmiranda9095
    @luizmiranda9095 3 месяца назад +4

    I can't say enough how incredible your teaching is.

  • @CCPony
    @CCPony Год назад +10

    NO ONE can take complex concepts and make them as understandable as Deborah can. No one.

    • @deborah_kurata
      @deborah_kurata  Год назад

      Thank you so much for the kind words. You made me smile this morning!

  • @MrEltoni12
    @MrEltoni12 Год назад +13

    Since i started working with Angular, i have always referred to your Pluralsight courses for guidance. Your scenarios and code examples are very clean and you explain things exceptionally well. I will be definitely be adding your videos to the Jr developers i work with.

  • @user-vw8dm9vl7s
    @user-vw8dm9vl7s 3 месяца назад

    Спасибо Вам большое!
    Я посмотрел большое количество видео про различия, но не понимал саму суть на реальных ситуациях. Ваши примеры очень помогли понять. Спасибо!
    ------
    Thank you very much!
    I watched a lot of videos about the differences, but did not understand the essence in real situations. Your examples helped me a lot to understand. Thank you!

  • @coryjseaman44
    @coryjseaman44 Год назад +2

    Love your material, Deborah, and I frequently recommend your Pluralsight courses to my team. I asked ChatGPT for a good analogy for the higher-order operators, and I liked the response:
    > concatMap is like a waiter who serves your dishes one by one in the order they are received, never jumping ahead to serve another dish before the current one is finished.
    > mergeMap is like a server who brings out all your dishes at once, regardless of what order they were received in.
    > switchMap is like a head chef who oversees multiple tables and ensures that the kitchen only prepares and serves the dishes for the table that is currently being attended to, discarding any previous dishes that were being prepared for other tables.

    • @deborah_kurata
      @deborah_kurata  Год назад

      Thank you so much for the kind words!
      Great ChatGPT answer! It's amazing that it can do something as complex as a metaphor. And it's correct. And consistent. Very cool!
      I was using it for some Git commands last night and it was really good at remembering my repo and branch names in between different questions. Fun stuff!

  • @yunm1824
    @yunm1824 Месяц назад

    oh my. this cleared my confusion on these map stuff for so long!

    • @deborah_kurata
      @deborah_kurata  Месяц назад

      So great to hear that this was helpful. Thank you!

  • @mirjana72003
    @mirjana72003 4 месяца назад

    Your videos are why I bought the Pluralsight subscription. The level of your content is unmatched, thank you so much! 😊 Not to mention you are the reason why I finally can use RxJS 😅

  • @elayamaransekar3790
    @elayamaransekar3790 Год назад

    As someone here has commented out, I started learning Angular watching your videos. I like the way you explain each concepts clearly with examples. I wish to see lot of advanced latest topics. Thanks once again.

    • @deborah_kurata
      @deborah_kurata  Год назад

      Thank you so much! I appreciate it!
      Have you seen the videos on standalone components and the new signals features?

  • @alexpappas610
    @alexpappas610 6 месяцев назад +1

    For switchMaps it's important to note that if you're thinking of http requests, the requests are already done and they are not literally cancelled but the observable just ignores the response of those "cancelled" ones and does not emit the values.

  • @omphemetsemafoko830
    @omphemetsemafoko830 9 месяцев назад

    Your explanation sis very clear and precise to the point. After watching your video, a lot of confusion has been cleared on my mind based on your explanation. Thank you and God bless you.

    • @deborah_kurata
      @deborah_kurata  9 месяцев назад

      Glad it was helpful! Thank you for watching!

  • @devxbasit
    @devxbasit 6 месяцев назад

    This is the best explanation I have ever watched, irrespective of the topic or programming language.

    • @deborah_kurata
      @deborah_kurata  5 месяцев назад

      Wow! That is so great to hear. Thank you! 🙏🏼

  • @dextrusdalabassistan
    @dextrusdalabassistan 10 месяцев назад

    Thanks for this, it answered a problem was having where I was performing multiple http get requests but only seeing a single response, i.e using switchMap when I should have used concatmap or mergemap!

    • @deborah_kurata
      @deborah_kurata  9 месяцев назад

      So glad to hear it was helpfu!😊

  • @ilgul9177
    @ilgul9177 7 месяцев назад

    Thank you for the brilliant explication of this different maps. English is not my native language, but understood all clearly.

    • @deborah_kurata
      @deborah_kurata  7 месяцев назад

      Great to hear that the video was clear and helpful!

  • @alexle7895
    @alexle7895 7 месяцев назад

    concatMap = Relay race (brilliant example). For people with English as a second language, the analogy is perfect.

    • @deborah_kurata
      @deborah_kurata  7 месяцев назад

      So great to hear the analogy works! Thank you!

  • @purushottamgupta2950
    @purushottamgupta2950 Год назад

    Mam, you are a legend. This explanation is so good, I can now recall this in mid sleep !

  • @khadkasubarnabijaya
    @khadkasubarnabijaya 9 месяцев назад

    So far the best explanation on this topic for me!😀

    • @deborah_kurata
      @deborah_kurata  9 месяцев назад

      Awesome, thank you! Glad it was helpful!

  • @metric152
    @metric152 Год назад

    This was fantastic. I tend to use switchMap for requests but haven’t needed the others yet. Good to know how they work.

  • @abdelrahmanamer157
    @abdelrahmanamer157 Год назад +1

    well explained, smooth and easy examples 👏👏
    Keep it up @deborah 🙌

  • @PotensElit
    @PotensElit 6 месяцев назад

    simplicity is the best way to teach .. thanks!👍

  • @user-nc6ho6dj3i
    @user-nc6ho6dj3i 3 месяца назад

    Thank you so much, I really appreciate it :)

  • @juliorodriguez4946
    @juliorodriguez4946 Год назад

    Best explanation ever! I'm glad I found you on RUclips! :)

  • @stefanotrivellin5939
    @stefanotrivellin5939 6 месяцев назад

    Beautiful and clean explaination, thank you!

  • @carolruo
    @carolruo Год назад

    Best teacher, please do more videos on Angular

    • @deborah_kurata
      @deborah_kurata  Год назад +1

      Thank you for the kinds words!
      And will do! Any particular topics?

    • @carolruo
      @carolruo Год назад +1

      @@deborah_kurata I''m currently learning more about interceptors and authentication process. Since I'm an intern, any topic from an expert is of great help, I like to understand how stuff really works

  • @ErShikharChauhan
    @ErShikharChauhan Год назад

    nice Video! this could have include exhaustMap as the last example when we need just first emitted value and ignore all subsequent requests.

    • @deborah_kurata
      @deborah_kurata  Год назад

      Glad to hear you liked the video. Yeah, I've considered adding exhaustMap, but wasn't sure it was a common use case.
      Could you share the scenarios where you find it most useful?

  • @carlosvillegas33
    @carlosvillegas33 Год назад

    Thanks Deborah for share your knowledge It helfull me. 💪

    • @deborah_kurata
      @deborah_kurata  Год назад

      Glad it was helpful! Thank you for watching!

  • @barhate_gm
    @barhate_gm 5 месяцев назад

    Perfect 🤩

  • @respostasimples
    @respostasimples Год назад

    you're doing the gods work, thanks!

  • @emreaka3965
    @emreaka3965 Год назад

    thank you

  • @Amandeepsingh-tj9oj
    @Amandeepsingh-tj9oj Год назад

    Best video ever!!

    • @deborah_kurata
      @deborah_kurata  Год назад

      Wow! What a wonderful complement! Thank you!

  • @abnow1998
    @abnow1998 Год назад

    Great explanation!🙌

  • @R80onaldinho
    @R80onaldinho Год назад +1

    Thank you for explanation , can you make a videos of creating a real world project from scratch using reactive programming Thank you again

  • @ali-13392
    @ali-13392 10 месяцев назад

    Hey Deborah! Thanks for the video. I'm still learning reactive development and had a question. In my previous approach, what I would have done, is to add [(ngModel)] or form control to the dropdown, then add "onChange" event on the dropdown, and pass the "userId" from there to a function in component. Then, used that to call http get and retrieve the "Todo" list. I know this is not reactive, but is that still a bad approach? Wanted to know what you think? Thanks!

    • @deborah_kurata
      @deborah_kurata  9 месяцев назад

      Thank you for watching!
      There is nothing wrong with your current approach. It just doesn't get the benefits that a reactive approach has (which may or may not be applicable to your scenario). With a reactive approach, it's easier to combine streams because you have the stream in a variable you can reference, for example.
      But many of these approaches will be changing further as more as more signal features are implemented. It will be interesting to see how signals affect our common scenarios.

  • @kevintale2608
    @kevintale2608 Год назад

    Best explanations I've seen so far about xxxMap!
    So in short, switchMap cancels the inner observable if the outer emits before the inner completes, right? But what does that mean to "cancel" an observable exactly? I know that it will cancel the http call, is that what canlelling means or it would apply for any type of inner obs (not http calls requests only)?
    Thanks Deborah !

    • @deborah_kurata
      @deborah_kurata  Год назад +1

      Thank you!
      Yes, you are correct. I assume what it means for other types of Observable depends on the Observable?
      For example, for a synchronous Observable, a$ = of(1, 2, 3), the values are emitted synchronously so there isn't an opportunity to cancel them.

  • @jeffnikelson5824
    @jeffnikelson5824 Год назад

    You are the best
    thanks a lot for the content deborah
    hope there is more to come
    if I can give some Feedback: You could try to present more compact and make your videos slightly shorter ❤️

    • @deborah_kurata
      @deborah_kurata  Год назад

      Thank you for the kind words and the feedback.
      Most of my recently posted videos have been a bit shorter. (See this: ruclips.net/p/PLErOmyzRKOCqaSzFo5A3Og1ZiFo0ZR0gB)
      In this one, I wanted to cover each of the three operators in one video to compare them, so it got a bit longer. Do you think doing 3 shorter videos ... one for each operator ... would have been better?
      Any specific suggestions for how I could have made it more compact?
      Thanks again!

  • @nhieljeff2156
    @nhieljeff2156 8 месяцев назад

    you sound like glados, i love glados

    • @deborah_kurata
      @deborah_kurata  8 месяцев назад

      I shed tears every time I hear that.

  • @Tyler.Durden
    @Tyler.Durden Год назад

    Have you considered uploading your amazing knowledge to Udemy vs plural?

    • @deborah_kurata
      @deborah_kurata  Год назад +2

      So kind of you to say that the info is amazing. Thank you!
      I tried Udemy about 2 months ago. I was not able to get approved as an instructor on Udemy. I couldn't get past their automated "author verification" system. I have no idea how to get in touch with a person ... so I have been posting here instead.
      I'm open to any other suggestions ... :-)

  • @jayakumar2927
    @jayakumar2927 Год назад

    can you share github link

    • @deborah_kurata
      @deborah_kurata  Год назад

      I have a GitHub repo here: github.com/DeborahK/Angular-Posts
      But it doesn't demonstrate the difference between switchMap, mergeMap and concatMap. But it does show the switchMap in action.
      Hope that helps.

  • @samsondavidoff372
    @samsondavidoff372 Год назад

    What is userSelectedAction$? I don’t understand it 🫤

    • @deborah_kurata
      @deborah_kurata  Год назад

      this.userSelectedAction$ is the Observable part of a Subject.
      For more context, consider watching this video: ruclips.net/video/bqIj-m7Uxzk/видео.html
      It is longer, but covers a more complete look at using a Subject to respond to a user action.
      Let me know if that helps. Feel free to post additional questions.