switchMap vs concatMap vs mergeMap ... Oh My!

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

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

  • @luizmiranda9095
    @luizmiranda9095 6 месяцев назад +7

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

  • @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.

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

    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!

  • @danielhalasz-szabo5143
    @danielhalasz-szabo5143 12 дней назад

    Thank you. Best explanation so far i have found on the internet.

    • @deborah_kurata
      @deborah_kurata  8 дней назад

      Wow! That's wonderful to hear. 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!

  • @АртурЦой-ц8н
    @АртурЦой-ц8н 6 месяцев назад

    Спасибо Вам большое!
    Я посмотрел большое количество видео про различия, но не понимал саму суть на реальных ситуациях. Ваши примеры очень помогли понять. Спасибо!
    ------
    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!

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

      So glad the video was helpful! 😊

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

    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 😅

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

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

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

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

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

    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  Год назад

      Glad it was helpful! Thank you for watching!

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

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

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

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

  • @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 8 месяцев назад +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.

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

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

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

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

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

      Awesome, thank you! Glad it was helpful!

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

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

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

      So great to hear the analogy works! Thank you!

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

    Thank you for the video! It's so short and clear

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

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

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

      Great to hear that the video was clear and helpful!

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

    Thanks Deborah for share your knowledge It helfull me. 💪

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

      Glad it was helpful! Thank you for watching!

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

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

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

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

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

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

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

    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!

  • @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.

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

    you're doing the gods work, thanks!

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

    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

  • @ali-13392
    @ali-13392 Год назад

    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  Год назад

      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.

  • @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?

  • @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

  • @ThangPhan-q3u
    @ThangPhan-q3u 6 месяцев назад

    Thank you so much, I really appreciate it :)

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

    Great explanation!🙌

  • @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.

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

    Perfect 🤩

  • @hendrx
    @hendrx 3 дня назад

    its easier when you call it "calls" instead of "map"
    - concatinate calls -> concatMap
    - merge calls - mergeMap
    - switch calls - switchMap

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

    thank you

  • @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 ... :-)

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

    Best video ever!!

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

      Wow! What a wonderful complement! Thank you!

  • @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 11 месяцев назад

    you sound like glados, i love glados

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

      I shed tears every time I hear that.

  • @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.

  • @SachalChandio
    @SachalChandio 25 дней назад

    how are you so awesome

  • @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.