Тёмный

Angular State Management Tutorial with NgRx Component Store 

Brandon Roberts
Подписаться 4,2 тыс.
Просмотров 9 тыс.
50% 1

NgRx is a framework for building reactive applications in Angular. NgRx ComponentStore is a library for managing local component state reactively in Angular.
👀 Socials:
GitHub - github.com/bra...
Twitter - / brandontroberts
Twitch - / brandontroberts
Polywork - poly.work/bran...
Blog - brandonroberts...
Discord - / discord
💻 OSS:
NgRx - github.com/ngr...
Angular Component Router - github.com/ang...
💰
Support my work on GitHub sponsors - github.com/spo...
🎥 Livestreams every Friday at 2:30pm ET/11:30am PT
ru-vid.com...
/ brandontroberts
🎵 Music by Chillhop Music: chillhop.ffm.t...

Опубликовано:

 

24 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 38   
@xocomil
@xocomil 2 года назад
The ComponentStore single-handedly changed the way I write Angular code. This is an excellent tutorial. Thank you for creating it.
@BrandonRobertsDev
@BrandonRobertsDev 2 года назад
Thanks Jason, I really appreciate that
@DanielCruz.developer
@DanielCruz.developer 2 года назад
I've been having some trouble understanding this whole topic of 'component store' but this guide is clear and simple, Thanks man!!!
@BrandonRobertsDev
@BrandonRobertsDev 2 года назад
Thank you, glad you found it useful!
@juanrestrepo5437
@juanrestrepo5437 Год назад
Awesome tutorial man. I will book mark it for future use.
@BrandonRobertsDev
@BrandonRobertsDev Год назад
Thanks Juan!
@Dean-Shepp
@Dean-Shepp 2 года назад
This was really helpful, love to see you do with with an effect in the store.
@Firefuze
@Firefuze Год назад
This helped me out a bunch at work! Thanks!
@BrandonRobertsDev
@BrandonRobertsDev Год назад
Awesome!
@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 :)
@BrandonRobertsDev
@BrandonRobertsDev Год назад
Thanks Lars!
@g-luu
@g-luu 2 года назад
i love these more than live streams they on point and short. Thanks.
@BrandonRobertsDev
@BrandonRobertsDev 2 года назад
Thanks Bryan!
@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 года назад
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 😄
@sigitpratama1016
@sigitpratama1016 Год назад
thanks sir, very helpful
@BrandonRobertsDev
@BrandonRobertsDev Год назад
No problem
@aram5642
@aram5642 2 года назад
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
@michaelfaith
@michaelfaith 2 года назад
Great tutorial. Super helpful. Thanks
@BrandonRobertsDev
@BrandonRobertsDev 2 года назад
Thanks Michael!
@theanswer1993
@theanswer1993 Год назад
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 Год назад
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.
@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 года назад
Awesome! Yep, my next video will be about side effects with ComponentStore and how they compare with effects
@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.
@AdrianoMassi
@AdrianoMassi Год назад
you are my hero!
@BrandonRobertsDev
@BrandonRobertsDev Год назад
Why thank you! 😄
@AdrianoMassi
@AdrianoMassi Год назад
@@BrandonRobertsDev because thanks to yor video I eventually understood how to make NgRX to work!!!
@BrandonRobertsDev
@BrandonRobertsDev Год назад
Awesome!
@hansschenker
@hansschenker 2 года назад
What is the relationship between NgRx Store and NgRx/Componentstore?
@BrandonRobertsDev
@BrandonRobertsDev 2 года назад
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.
@jaybee6382
@jaybee6382 6 месяцев назад
What are your thoughts on RxAngular?
@BrandonRobertsDev
@BrandonRobertsDev 6 месяцев назад
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 года назад
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.
@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 года назад
Lol that's fine. I'm not here to teach you "perfect" coding practices ... yet 😉
Далее
I bet you can understand NgRx after watching this video
22:48
Китайка нашла Новый Дом😂😆
00:20
Avaz Oxun - Turqi sovuq kal
14:50
Просмотров 296 тыс.
Creating Actions with NgRx Just Got Even Easier
6:09
Ngrx Component store basics using Angular 12 project
18:00
This version of Angular will live forever ...
9:22
Просмотров 3,6 тыс.