NgRx Signals Store - Is It a NgRx Replacement?
Вставка
- Опубліковано 19 чер 2024
- ► LEARN MORE ABOUT UPLOADCARE - uploadcare.com/
Learn NgRx signals store which is a new library from NgRx family. It simplifies working with signals and organizes them in efficient manner introducing new rules to the code.
TIMESTAMPS
0:00 Introduction
2:18 NgRx signals installation
3:13 NgRx signals state
10:01 NgRx signals store
11:29 NgRx withComputed
12:40 NgRx withMethods
15:57 Rx method
► CHECK MY COURSES - monsterlessons-academy.com/co...
MOST POPULAR COURSES
► Building real project with Angular + NgRx - monsterlessons-academy.com/co...
► Building real NestJS API - monsterlessons-academy.com/co...
► Javascript interview questions - monsterlessons-academy.com/co...
► Angular Interview Questions monsterlessons-academy.com/co...
► Building real fullstack project - monsterlessons-academy.com/co...
► Mastering Git - monsterlessons-academy.com/co...
► Mastering Docker and Docker Compose - monsterlessons-academy.com/co...
► Building real project with React Hooks - monsterlessons-academy.com/co...
► Building real project with Vue + Vuex - monsterlessons-academy.com/co...
FOLLOW ME
► TWITTER - / monster_lessons
► INSTAGRAM - / monsterlessonsacademy
► TIKTOK - / monsterlessonsacademy
REFERENCES
► Source code - github.com/monsterlessonsacad...
WOW! I got moved to a team that was using NG17, I needed to learn this fast. THANK YOU FOR GETTING TO THE POINT QUICKLY! Much appreciated!!
You're welcome!
I love this, straight to the point. Exactly what I need as we're planning on upgrading to Angular 17
Glad you like it!
I finally implemented Signal Store in my app. All possible due to your amazing tutorial. Thanks
Great to hear!
Thanks a lot for this awesome explanation.
Glad it was helpful!
Great that you provide source code, i probably mentioned it before. I like the tutorial now, because i can follow it with that. Thanks!
Glad it was helpful!
@@MonsterlessonsAcademy Also bought a course from you, mainly because of the detailed tutorials you have on the chanel.
@@zoltanhorvath2238 Happy learning!
Thank you very much!
You are welcome
Thank you so much! :)
You're welcome!
Thank you very much. ❤
You are welcome!
Thank you for your help
Happy to help
like for video, as always! Thank you buddy, for really good description and explanation
Glad you liked it!
Thanks
Thank you so much for your support. It means a lot to me!
Thank you very much for your amazing lessons. I guess we can use this new signal store instead of the main ngrx store for our state management, what do you think about this🤔
Kind of but it is still not a replacement. It's more to organize signals inside your service or component.
@@MonsterlessonsAcademy HI. You wrote about it as singular form. Do you think that we should use it connected only with one particular service or component.
Can we use it like global store?
I found that it is not connected with redux chrome plugin (provideStoreDevtools is not working for it). What is the best way to debug it?
Very nice explanation. What I wonder is, how can this be combined with ngrx store in a meaningful way?
It can't. It's a replacement for plain signals. Just use it simultaniously with ngrx store if you need to
@@MonsterlessonsAcademy yeah that's what I meant, but I'm not sure how exactly. What I'm thinking of would be subscribing to a selector and save the value as a signal maybe?
@@NiGhTm4r389 You want this.store.selectSignal(selector)
why is ngIf and ngFor are written in old format ? not like @for and @if ?
and 2nd dont u think ngrxsignal is kinda redundant ?
Bad habbit.
I don't see why it's redundant
What's the pros and cons ,while using this signalstore compared to component store , please explain.
It's signals. All other rules are same like in component store
Would you keep this in a separate file than your component?
Yes you can. There is a great example of this in their documentation under @ngrx/signals > rxjs-integration
Do what you like more for your taste.
Thanks for the tutorial. Once the page gets forcefully refreshed (F5), all the signal/subject values are getting cleared. How to fix this ? . Please help.
It's Javascript. It only exists in memory. Yes everything is removed after page reload. You either use local storage to store some values or recreate your state after reload.
@@MonsterlessonsAcademy when I tried to update Signal at effect getting error message like this. please suggest. Writing to signals is not allowed in a `computed` or an `effect` by default. Use `allowSignalWrites` in the `CreateEffectOptions` to enable this inside effects.
“What does this extremely descriptive well written error mean??!?”
Great video as usual! I suggest using VS Code as IDE, it helps most of us to follow the video along with the file structure.
Great suggestion!
But does it remain on the refresh page?
Nope. It's just javascript
@@MonsterlessonsAcademy so it doesn't retain the HR state like ngrx store?!
@@anutaNYC Nothing does that without local storage or etc. Ngrx store also doesn't
@@MonsterlessonsAcademy i always thought store stays on all pages since it's SPA applications with angular, thank you for you response.
It's a shame that the signal store doesn't work with the redux debug feature in chrome like ngrx/store does. Yes, it's not the same, has no actions etc. but it would still be nice.
Yeap
Angular is more and more like React, good trend
Yeap