Angular 19 Resource API is exactly what we needed!

Поділитися
Вставка
  • Опубліковано 5 січ 2025

КОМЕНТАРІ • 27

  • @H2-oe4cu
    @H2-oe4cu 2 місяці тому +4

    At a recent Jetbrains conference, one of the Angular developers said that the Resource API came about because they were working with the Google Fonts team on zoneless, and realised this is what they needed. I also suspect they are keen to remove all need for rxjs as it is not beginner friendly, and we would typically use rxjs for the back-end calls.

    • @ZoaibKhan
      @ZoaibKhan  2 місяці тому +2

      Exactly! RxJS will become optional eventually so this is all in preparation for that.

  • @akram.shaikh
    @akram.shaikh 2 місяці тому +2

    Thanks Zoaib you always explain new concepts in simplest way.

    • @ZoaibKhan
      @ZoaibKhan  2 місяці тому

      Glad you liked it, Akram! 🙂

  • @IbrahimMouhsine
    @IbrahimMouhsine 2 місяці тому +2

    Thank you Zoaib for these videos. We hope you will upload more to make us professional

    • @ZoaibKhan
      @ZoaibKhan  2 місяці тому +1

      You're welcome 🤗

  • @Brumry
    @Brumry 2 місяці тому +1

    Clear, short and informative.

    • @ZoaibKhan
      @ZoaibKhan  2 місяці тому

      Glad you liked it 😊

  • @TheZukkino
    @TheZukkino 2 місяці тому +1

    Your explaination is always clear.
    This API is really interesting and reduces a lot many client side waste code. I hope they will implicitely manage the async call or maybe provide a default management.
    Please make a video with a complete form management (NEW or EDIT) with this new API.
    Thanks for your videos!

    • @ZoaibKhan
      @ZoaibKhan  2 місяці тому +1

      Glad you liked it! And I was thinking of exactly the same thing about an example with forms - would be a good use case of this API.
      Will work on it :)

  • @DirtySouth33T
    @DirtySouth33T 2 місяці тому +1

    Awesome man! I just subbed to your patreon!!!

    • @ZoaibKhan
      @ZoaibKhan  2 місяці тому +1

      Thanks Adam! 🤗

  • @voltairend
    @voltairend 2 місяці тому

    Thank you Zoaib

    • @ZoaibKhan
      @ZoaibKhan  2 місяці тому

      You're welcome! 😄

  • @rohitkharche7562
    @rohitkharche7562 2 місяці тому +1

    Tanstack query but for angular. Would love to see how this get implemented while using angular ssr

    • @ZoaibKhan
      @ZoaibKhan  2 місяці тому +2

      Yes, very similar to tanstack query! For SSR, I guess it would work depending on when the specific component gets hydrated. There's a new hydrate option with defer...

  • @ai-insightful-podcasts
    @ai-insightful-podcasts 2 місяці тому

    Great video. Can you explain the binding between the url parameter and the bookId? Thanks

    • @ZoaibKhan
      @ZoaibKhan  2 місяці тому

      Thanks 🙏 I already have a video for that: ua-cam.com/video/L2mlrvDYvoA/v-deo.htmlsi=KjJZXhPCmb87XnsF

  • @vladnovski6050
    @vladnovski6050 Місяць тому

    Do you think there will be any reasonable way to use the Resource API together with state management tools like NGRX?

    • @ZoaibKhan
      @ZoaibKhan  Місяць тому +1

      Yes, patterns will eventually emerge for the resource API for different use cases. Already some have suggested declaring resource in a service so that the component remains dumb. The same can be done with ngrx as well I guess

  • @asdasdasdasdasdasd-t5v
    @asdasdasdasdasdasd-t5v Місяць тому

    hi, when we call api, we write func directly in Component Class or service class, upgrade angular 19 make me confuse 😅

    • @ZoaibKhan
      @ZoaibKhan  Місяць тому

      It's a best practice to keep it in a service, so that the component does not have much logic and only shows the data fetched

  • @souradeeppanja739
    @souradeeppanja739 Місяць тому

    Great video as usual, but one small doubt can't we use httpClient in resource api ? As if we use fetch then the interceptor will not work

    • @ZoaibKhan
      @ZoaibKhan  Місяць тому +1

      There is an observable based equivalent to resource called rxResource. More details in the blog post here.
      push-based.io/article/everything-you-need-to-know-about-the-resource-api

    • @souradeeppanja739
      @souradeeppanja739 Місяць тому +1

      @@ZoaibKhan Thanx a lot zoaib

  • @jetonpeche
    @jetonpeche 2 місяці тому

    Replace httpClient ?!

    • @ZoaibKhan
      @ZoaibKhan  2 місяці тому +1

      Well, not replace exactly, but provide an alternative for now. Also, this is just for reading/fetching data, not for updating/creating.