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 😄
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?
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!
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
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?
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.
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.
The ComponentStore single-handedly changed the way I write Angular code. This is an excellent tutorial. Thank you for creating it.
Thanks Jason, I really appreciate that
I've been having some trouble understanding this whole topic of 'component store' but this guide is clear and simple, Thanks man!!!
Thank you, glad you found it useful!
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 :)
Thanks Lars!
This was really helpful, love to see you do with with an effect in the store.
Awesome tutorial man. I will book mark it for future use.
Thanks Juan!
This helped me out a bunch at work! Thanks!
Awesome!
Thanks for the video. I used the Ngrx Store for a while, but haven't utilize Component Store yet :D
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 😄
i love these more than live streams they on point and short. Thanks.
Thanks Bryan!
thanks sir, very helpful
No problem
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?
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.
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!
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
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?
Awesome! Yep, my next video will be about side effects with ComponentStore and how they compare with effects
What are your thoughts on RxAngular?
RxAngular is a great option also. It's well maintained by very smart people and is very focused on performance around Angular primitives.
Any reason to use the updater over setState or patchState?
Thanks for sharing 🙂
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.
On which repo we can see Your work for this video? I can't find it on github repos from description. Greetings from Serbia.
What is the relationship between NgRx Store and NgRx/Componentstore?
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.
Great tutorial. Super helpful. Thanks
Thanks Michael!
you are my hero!
Why thank you! 😄
@@BrandonRobertsDev because thanks to yor video I eventually understood how to make NgRX to work!!!
Awesome!
I love your work and videos but I can't help to cringe when I see the deleteProduct filter's callback 🙈
Lol that's fine. I'm not here to teach you "perfect" coding practices ... yet 😉