Angular State Management Tutorial with NgRx Component Store

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

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

  • @xocomil
    @xocomil 2 года назад +2

    The ComponentStore single-handedly changed the way I write Angular code. This is an excellent tutorial. Thank you for creating it.

  • @DanielCruz.developer
    @DanielCruz.developer 2 года назад +3

    I've been having some trouble understanding this whole topic of 'component store' but this guide is clear and simple, Thanks man!!!

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

    This is just great. I must say, the new functional way of defining component-store, together with inject() just blows my mind in awesome-ness :)

  • @Dean-Shepp
    @Dean-Shepp 2 года назад

    This was really helpful, love to see you do with with an effect in the store.

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

    Awesome tutorial man. I will book mark it for future use.

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

    This helped me out a bunch at work! Thanks!

  • @dale_nguyen
    @dale_nguyen 2 года назад

    Thanks for the video. I used the Ngrx Store for a while, but haven't utilize Component Store yet :D

    • @BrandonRobertsDev
      @BrandonRobertsDev  2 года назад +1

      Thanks! I think that's pretty common right now. Its popular amongst a smaller set of NgRx users. I'm planning to make some more NgRx videos also for the OGs 😄

  • @g-luu
    @g-luu 2 года назад

    i love these more than live streams they on point and short. Thanks.

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

    thanks sir, very helpful

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

    Am I correct in thinking that if I wanted to use component store as my "global store" I would add it as a provider to my app component? And then I could use it in any child component as well without loosing the data? Is this a good case in your opinion or is it better to go with the big brother ngrx store?

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

      Yes that's correct. You can add it to the AppComponent providers or just add providedIn: 'root' to the Injectable decorator to make it global.

  • @aram5642
    @aram5642 2 года назад +1

    Really enjoying this content here! I still have a bit of confusion as for the generic type for the Store being provided while injecting it into component:
    private store: Store --vs-- private store: Store. How does it affect selectors? Any other precautions/practices? Would you be so kind to cover that in the future? Thanks!

    • @BrandonRobertsDev
      @BrandonRobertsDev  2 года назад

      The rule today is that you don't need to use the generic with the Store anymore if you're creating selectors with createSelector and createFeatureSelector. I will cover NgRx Store/Effects in future videos

  • @chandlerbaskins2787
    @chandlerbaskins2787 2 года назад

    This is awesome! I love component store. Do have anything coming down the pipe about component store effects and how they are different than @ngrx/effects?

    • @BrandonRobertsDev
      @BrandonRobertsDev  2 года назад +1

      Awesome! Yep, my next video will be about side effects with ComponentStore and how they compare with effects

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

    What are your thoughts on RxAngular?

    • @BrandonRobertsDev
      @BrandonRobertsDev  9 месяцев назад +1

      RxAngular is a great option also. It's well maintained by very smart people and is very focused on performance around Angular primitives.

  • @blokche_dev
    @blokche_dev 2 года назад

    Any reason to use the updater over setState or patchState?
    Thanks for sharing 🙂

    • @BrandonRobertsDev
      @BrandonRobertsDev  2 года назад +2

      An updater is more flexible in that it can take a value or an observable, so you could use some sort of stream that automatically feeds the store.
      Value changes from a reactive form is one example.

  • @markorazumenic6915
    @markorazumenic6915 2 года назад

    On which repo we can see Your work for this video? I can't find it on github repos from description. Greetings from Serbia.

  • @hansschenker
    @hansschenker 2 года назад

    What is the relationship between NgRx Store and NgRx/Componentstore?

    • @BrandonRobertsDev
      @BrandonRobertsDev  2 года назад +1

      There is no direct relationship between NgRx Store and NgRx Component Store, and that's intentional. NgRx ComponentStore is meant to be used for managing local component state reactively. There could be multiple ComponentStores in your application, and it doesn't depend on the global Store in any way. It also has the added benefit of being a regular service that could be used globally if needed.

  • @michaelfaith
    @michaelfaith 2 года назад

    Great tutorial. Super helpful. Thanks

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

    you are my hero!

  • @Booster2ooo
    @Booster2ooo 2 года назад

    I love your work and videos but I can't help to cringe when I see the deleteProduct filter's callback 🙈

    • @BrandonRobertsDev
      @BrandonRobertsDev  2 года назад +1

      Lol that's fine. I'm not here to teach you "perfect" coding practices ... yet 😉