💥 The RxJs shareReplay Operator - preventing duplicate HTTP requests

Поделиться
HTML-код
  • Опубликовано: 6 июл 2018
  • This video is part of the RxJs In Practice Course - angular-university.io/course/...
    Check out the Angular University Ebooks:
    Check out the PDF E-Books available at the Angular University -
    angular-university.io/my-ebooks
    For more videos tutorials on Angular, check the Angular University website - angular-university.io
    Follow us:
    Twitter - / angularuniv
    Google+ - plus.google.com/u/1/113731658...
    Facebook - / angular.university

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

  • @AngularUniversity
    @AngularUniversity  5 лет назад +2

    This video is part of the RxJs In Practice Course - angular-university.io/course/rxjs-course

  • @juanbiscaia
    @juanbiscaia 6 лет назад +8

    The video is great, explains really well what this operator can do for you... But you didn't mention its optional parameters and how you may use it: bufferSize, window and scheduler...

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

    The best explanation ever! Thanks!

  • @mateja176
    @mateja176 6 лет назад +3

    Great video Vasco, thanks!

  • @manar.kurmanov
    @manar.kurmanov Год назад +1

    In that case, how can we refetch HTTP request again?

  • @daniellaerachannel
    @daniellaerachannel 6 лет назад +1

    excellent

  • @abuumar4079
    @abuumar4079 3 года назад +2

    If the two subscriptions where located in two different components is the result going to be same?

  • @MM-de4we
    @MM-de4we 5 лет назад +3

    Why not use behaviorsubject instead ?

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

    How is it use with NgRX Selectors? It is the same?

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

      Actually Ngrx selectors are a whole separate thing, they are not related to this operator. I have content on that, I think here on the channel but also on my NgRx In Depth course.👍

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

    You have a problem, Why are you calling http requests in that way?
    You have to make just one http request using a Promise, and when you have this response, you only need to use Array.map and Array.filter to separate categories and that's it!
    Then in your component you assign that category in a class property. Don't do crazy things.
    And also these observables never going to emit any new information until reload page! So you dont need to use, at least that you were using a real time database like Firebase

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

      Than what's is the point of using rxjs at all . In this example the author mentioned blueprint which could many complex calculation and you want to share the result in different places. I found it useful when I had to render two different charts in two different locations, in the same page and I couldn't change the backend api