I had a coding task where I had to use NGRX and absolutely no time. So I chose the shortest tutorial, which was this video, and managed to get a grasp of the concept, and do the task. So I want to thank you, Joshua for making this quick and dirty video.
This is perfect, thank you! I love how all the code is pre-written and you just walk us through the steps. And a sample app that is simple enough to make it not so confusing. As someone using Angular for 5 years, and managing state with RxJs and services, switching to NgRx is a real challenge mentally. It's a totally different way of thinking about state. But this is the general way it works in other frameworks, so it's good to know in Angular also.
Sweeeet! I just found your channel bc I need to start working with ngRx on a project I'm assigned to and this is probably the best approach to explain reducers I found. Thanks a bunch, you've got a new subscriber! Pls keep on your good work.
On the project I am currently working on, there was a guy taking care of all the ngrx stuff, but now that guy is not longer working with us, so I needed to understand the basics of ngrx. Honestly, I analyze our code, and I didn't understand anything. I have watched some other videos, but I still was a bit confused. Now, with this video, I finally understood mostly everything, realizing it is actually really easy. Thanks dude, hope your great work continues helping more people in my situation!
I had never seen NgRx before I watched this video. Now I feel like I could easily implement it in a project. This video was very clear, concise, and extremely informative. Thank you! First time I've seen your content, and I've immediately subscribed. Bravo 👏
Thank you so much for making this video! I have been using NgRx at work for the past year, but I never really understood why I was doing the things I was doing. After watching your code walkthrough something just clicked in my head and everything suddenly made sense. Keep up the good work!
Thank you for this video!! I’ve watched it probably 5 times over the past few months and this is the first time it’s fully clicked. You explained every part of it very well, I just needed to actually try it out and read their great documentation before I could get my head fully wrapped around the concept. I finally started implementing it in my own project this week because I know it’s an important library learn, and it’s essential to lean on standardized state management and reactivity as applications grow. We’re using NGRX in my job, but it has been mostly abandoned as more people touch the codebase who don’t understand how it works. Turns into a mess of random state management techniques and imperative code. I can’t wait to revive this approach in our project!
very concise and the author sticks to the point. We should make use of this video when we need to quickly brush up our skills on NgRx. Thanks for this video @Joshua
Thanks for the tutorial; I am just getting into the meat of NgRx and keep feeling like this is the work of a React developer that got so used to Redux and the benefits and decided it should be in Angular though the same benefit from Redux in Angular could be achieved by using a Mediator pattern in a much simpler way. Granted the way reducers are implemented here in the video is simple enough but I have seen some reducers in some of my client's solutions that will make a seasoned dev head spin
I am preparing for an interview this morning and needed a refresher on NgRx, since it has been a couple years. My wife sent me this and I think I'm going to be okay now.
This really just seems like redux for angular.. I love it. I have gotten used to rxjs thanks to your well explained videos, i've even went to the point of using rxjs in react.. made me realise how powerful it is as a library, and made me even better at angular.
Made me understand all the differenct concepts and components of NgRx! Really been struggling with understanding how it actually works. A couple of RxJs tutorials and this video made me understand everything on a whole different level! Great examples and structure of video.
This is not a critique on the tutorial its very informative and to the point. The more I look at this pattern, it just gets progressively worse. I have seen 4 different large scale implementations on ngrx on my clients code and not one is done in an eloquent way. Especially reducers become massive , and trying to nav a feature while having massive reducer files ( I have seen some with 2000+ lines of code / while some split the reducer into multiple files causing even more runaround to find the one for your action). Maybe its just a result of poor planning and design , but If Someone can please point me to a ngrx layout that kinda make things easier to find and navigate between actions , reducers and effects I will appreciate. In .net core I am used to using a combination of Domain Driven Design CQRS, and MediatR and using the project layout just makes sense , you can look at a Domain(folder) , look at the filenames in the handlers folder and immediately understand what actions/commands are available on each aggregate root , without having to read through 100's of lines of code.
Awesome presentation., thanks Joshua ! About the reducers part, I think it's worth mentioning that the { content } parameter is here to destruct the props that otherwise would contain also the type of the action.
Thanks Alain! And that's a great thing to mention, watching the video back I did worry that people might think that "content" was some special NgRx thing and not just a property of whatever random payload object I was sending along with the action.
Great explanation and demo!! Logically broken down to the different parts and explained their roles. I smashed that like buttom, subscribe, and left a comment so they YT gods will bless you
12:17 if you are on strict mode (it is enabled by default) line 17 should be like this: constructor(private store: Store); to avoid this error with selector: "app.state.ts(4, 3): 'todos' is declared here."
Simple question (that may be convoluted): "reducers are pure functions", none the less, when creating new todo (11:44), we create an ID with a simple method, yet could be RNG stuff... So function is not so pure anymore. Is it really important for NgRx to have pure reducer functions? (caching stuff may happen). Thanks for great content!
With React, pretty much all devs will also know Redux. But with Angular I'll bet a good percentage don't know NgRx. If nothing else, I think getting familiar with NgRx will give Angular devs a competitive edge in the job market
One thing I'd suggest is to keep the todo state folder under the todo tree, because you reference 'TodoService' in your effects file. This I consider an anti-pattern where narrowed application contexts (in this case the Todo context) are referenced by global contexts such as application state.
Hi Josh, in the TodoState you defined the "status" and "error" properties. How do we actually go about using these properties for example to show a loading spinner during loadTodos and an error message on loadTodosFailure actions? Do we have to create new selectors for each?
Usually you should create a vm selector, which is a view model selector, for that specific view, that selector should have the shape of {isLoading, error, content} and the component should handle those
great video! just one quick question: in the effect code (around minute 19:20) why is loadTodosSuccess being called like so while loadTodosFailure is wrapped in an "of" call?
I think it has something to do with it being an "error". When there is an error you want the operator flow to continue instead of ending there. So the catchError function is returning an Observable (because of the "of"). I just remember from other RxJs tutorials that in the catchError operator you still have to return an observable.
I wish RUclips didn’t have a “hearts” feature on comments, so questions like these would show up instead of the channel’s hearted comments showing up at the top. Those are always just “great tutorial” or whatever and helps no one
Hi Joshua, thank you for this tutorial. I have a question. WhenI call the select method, it appears an error on the selectAllTodos parameter which was only solved when I assigned to store the type in the constructor: private store: Store. I found this solution on stack but on this tuto you didn't use this solution, so I want to know if it's a change to the new library? Also apart from the fact that we have a second state, is there any use for using AppState in the selector ? Thank you
Thank for the explanation. NgRx is trying to simulate a single processor taking multiple request in a stack. It is more work than it really worth. Can use Rxjs and local store to achieve the same result and faster and easier?
Can you explain why did you use promise in the api call, instead of using only observable? Cause in my head I don't see any reason so convert results to promises and them convert it back to observable
Nice example, i just have a soubt, if you want to create a filter and aply that filter to the list of todos, you would create a new state for the results or it will be a new efect aply to the main todo array?
Thanks a lot , great video helped me a lot understanding the NgRx state management. I am relatively new to Angular and have one question : In a larger application since the data that will reside in the 'AppState' will be larger , it is going to affect the performance of the app.
The problem with introducing complex concepts like these is that it is so hard to fit into your mind, that some think they got it, but are actually implementing it wrong, or overuses it, making the already complex concept even more unnecessarily complex, I would even call it wrong.
Absolutely, I’m in a mess right now where NgRX was used simply to store data from an api call and then be used across a handful of components in a single feature. Everything that is being done could have been accomplished with a single service but instead there’s reducers, effects, states and a mess of logic being thrown around just to handle get/add/remove from a list of items.
Excellent, this really helped me understand NgRx and made my code look a lot more elegant. ❤️ How do you not get the TypeScript errors that I get though?!...
One thing i've struggled with when working with NGRX is how to handle data when for example you are logging in. Should I just dispatch a bunch of fetch actions in app component when user is logged in? Or should I have a side effect that listens to a loginSuccessful action and then do all dispatches there? Never found a best practice in this scenario, any advice?
Yes you can just use standard services/RxJS for state management - NgRx is never required, it's more a question of when it makes sense to use it. I'm not sure what you mean with your second question.
This looks so elegant but it is based in some abstract concepts, and quite honestly, it is just a simple todo application (could be coded so much simpler than this).
Hello Joshua, so if I understand it, you need to dispatch in ngOnInit action like allTodos and then in code above you are listening to again all todos selector as $observable and then show data in html using | async pipe, right? and also this dispatch is listening in effects from where you get data like from api calls. So basically, there is always two listeners for one action like selector in template and also effects that listen to this kind of action.
hi joshua , with your video passing from react to ngrx in angular was very simple! i just can't build the code , terminal provides me a lot of errors , do you have any suggestions how to build correctly the project ? thanks
Hi Joshua, I am about to start a Angular project based on data integration & data pipeline. Where a new data can be created, from multiple data sources (Amazon RDS, Hadoop, PosGres, stc.) . So should I use NGRX or not ?
Hey Josh, How NgRx should be structured in apps broken down by feature modules. For example like the one from your video 'How to structure your Angular apps like a Googler' ?
Hey check out this page in the docs: ngrx.io/guide/store/feature-creators - the general idea is that you register a feature with the StoreModule.forFeature() static method - in the end your global store is basically an object storing values, and by creating a feature your feature module will get a "slice" of that global state dedicated to it (e.g. a property within that object) and that property will be named whatever you register your feature as using forFeature()
I'm picking up build errors. Have there been updates since the video was made? The video seems newer than the timestamp of the repo. Another discrepancy I've noticed is that the VSC project title is not the same as the repo. The package.json seems outdated as well. I enjoy your YT presentations that take developers to the next level.
The general idea with this pattern is that you trigger an action when you want to load something, and you have an effect that is listening for that action. That effect triggers the HTTP request and if it is successful the effect will trigger some sort of "success" action with the data from the HTTP request as the payload, or an "error" action if it fails.
Hi, thx for tutorial. I wanter to learn ngrx like 3 months ago but I didn't feel like it till I watched this video. But I ran into some issues. Right now I'm working on a school project and I'm using prisma + express as a backend but I have problem with saving all object at once I would need to call add or remove just for one item per action and not whole list / state but don't really know how to do that yet. Also second problem is that as you used {content:string} as a type for adding Todo I'm using interface but unfortunately I found out that actions adds that type property to object when they get dispatched and that makes me problem when I send it to the back end because type isn't defined in my interface Is it possible somehow remove that property ? i found delete fucntion from ts but i cant call it because when i loop through my last before sending in service obviously type isn't know as property since actions forcefully add's it to it.
Generally simpler state management solutions are used, either people rolling their own state management or simpler libraries like NgRx Component Store or Elf. The global NgRx Store outlined in this video is generally used by larger teams working on more complex apps. It's still a pattern worth learning though, this whole idea of having actions that are interpreted by reducers to change state is quite common.
@@JoshuaMorony thank you, I think I'm going to give it a try. based on your teaching it's not that really hard to understand. and I think it's much more readable.
@@balajibalamurugan8053 no moreso when you are continuing to build the application - it's a bit of work up front to set up the reducers, but once everything is in place you have a very streamlined and organised way to add new features
Join my mailing list for more exclusive content and access to the archive of my private tips of the week: mobirony.ck.page/4a331b9076
I had a coding task where I had to use NGRX and absolutely no time. So I chose the shortest tutorial, which was this video, and managed to get a grasp of the concept, and do the task. So I want to thank you, Joshua for making this quick and dirty video.
Best Ever explanation on the internet,
22 WORTHY MINUTES FOR SURE .
He is not lying that was a damn good explanation 👍
This is perfect, thank you! I love how all the code is pre-written and you just walk us through the steps. And a sample app that is simple enough to make it not so confusing.
As someone using Angular for 5 years, and managing state with RxJs and services, switching to NgRx is a real challenge mentally. It's a totally different way of thinking about state. But this is the general way it works in other frameworks, so it's good to know in Angular also.
These were actually a highly educational 23 minutes. Thank you!
This explanation of asynchronous api fetching was so much clearer then the ones I've been struggling with in React with Redux/Saga. Thank you.
Sweeeet! I just found your channel bc I need to start working with ngRx on a project I'm assigned to and this is probably the best approach to explain reducers I found. Thanks a bunch, you've got a new subscriber! Pls keep on your good work.
As someone just jumping back into Angular, this has been a golden resource. Thanks man!
On the project I am currently working on, there was a guy taking care of all the ngrx stuff, but now that guy is not longer working with us, so I needed to understand the basics of ngrx.
Honestly, I analyze our code, and I didn't understand anything.
I have watched some other videos, but I still was a bit confused.
Now, with this video, I finally understood mostly everything, realizing it is actually really easy.
Thanks dude, hope your great work continues helping more people in my situation!
Honestly the most complete and easy to grasp explanation of ngrx, thank you so much for making me break the glass of frontend development 😆
Nicely done. Simple, straightforward , zero fluff.
I had never seen NgRx before I watched this video. Now I feel like I could easily implement it in a project.
This video was very clear, concise, and extremely informative. Thank you!
First time I've seen your content, and I've immediately subscribed. Bravo 👏
Thank you so much for making this video! I have been using NgRx at work for the past year, but I never really understood why I was doing the things I was doing. After watching your code walkthrough something just clicked in my head and everything suddenly made sense.
Keep up the good work!
Loved it ! I was looking for something to get a quick understanding of NgRx and the catchy name of the video did not disappoint.
Thank you for this video!! I’ve watched it probably 5 times over the past few months and this is the first time it’s fully clicked. You explained every part of it very well, I just needed to actually try it out and read their great documentation before I could get my head fully wrapped around the concept.
I finally started implementing it in my own project this week because I know it’s an important library learn, and it’s essential to lean on standardized state management and reactivity as applications grow.
We’re using NGRX in my job, but it has been mostly abandoned as more people touch the codebase who don’t understand how it works. Turns into a mess of random state management techniques and imperative code. I can’t wait to revive this approach in our project!
very concise and the author sticks to the point. We should make use of this video when we need to quickly brush up our skills on NgRx. Thanks for this video @Joshua
Thanks for the tutorial; I am just getting into the meat of NgRx and keep feeling like this is the work of a React developer that got so used to Redux and the benefits and decided it should be in Angular though the same benefit from Redux in Angular could be achieved by using a Mediator pattern in a much simpler way. Granted the way reducers are implemented here in the video is simple enough but I have seen some reducers in some of my client's solutions that will make a seasoned dev head spin
I am preparing for an interview this morning and needed a refresher on NgRx, since it has been a couple years. My wife sent me this and I think I'm going to be okay now.
Excellent video, this is the first i've seen someone explain ngrx the easiest way, hope to see your next videos, thanks 😊
This was really really helpful.
It was so easy compared to other videos i was on the verge of giving up but this video changed my outlook thanks.
This really just seems like redux for angular.. I love it. I have gotten used to rxjs thanks to your well explained videos, i've even went to the point of using rxjs in react.. made me realise how powerful it is as a library, and made me even better at angular.
Ng = Angular
Rx = Redux
so yeah, NgRx = Redux for Angular
Very good tutorial, have watched a few others but this one is very practical and finally I can see how to get started with it. Thanks!
Great tutorial Josh!!! Thanks for the calm and easy to understand explanations!!! That was epic !!!!
What a great, great explanation Joshua! Thank you so much for this :)
Made me understand all the differenct concepts and components of NgRx! Really been struggling with understanding how it actually works. A couple of RxJs tutorials and this video made me understand everything on a whole different level!
Great examples and structure of video.
This was very helpful. Even helped me understand some of what RxJS is doing in all this. Thanks!!
Your Angular code is much nicer than real world Angular code.
Another great video, Joshua! I've subscribed! Well done, and thank you!!
This is not a critique on the tutorial its very informative and to the point.
The more I look at this pattern, it just gets progressively worse. I have seen 4 different large scale implementations on ngrx on my clients code and not one is done in an eloquent way.
Especially reducers become massive , and trying to nav a feature while having massive reducer files ( I have seen some with 2000+ lines of code / while some split the reducer into multiple files causing even more runaround to find the one for your action).
Maybe its just a result of poor planning and design , but If Someone can please point me to a ngrx layout that kinda make things easier to find and navigate between actions , reducers and effects I will appreciate.
In .net core I am used to using a combination of Domain Driven Design CQRS, and MediatR and using the project layout just makes sense , you can look at a Domain(folder) , look at the filenames in the handlers folder and immediately understand what actions/commands are available on each aggregate root , without having to read through 100's of lines of code.
Awesome presentation., thanks Joshua !
About the reducers part, I think it's worth mentioning that the { content } parameter is here to destruct the props that otherwise would contain also the type of the action.
Thanks Alain! And that's a great thing to mention, watching the video back I did worry that people might think that "content" was some special NgRx thing and not just a property of whatever random payload object I was sending along with the action.
@@JoshuaMorony I would have given the name 'todo' not 'content' - even though you only pass the name of a todo!
@@hansschenker yeah I think that would have been better for this example
AWESOME work. Yes I DO understand NgRx now!
Quality work right here. Very helpful!
This looks so cool
Just by looking at your component code I can see this is awesome
Very helpful. Clear and concise
nothing can explain better than this.
Fantastic introduction. Thanks!
That was verry hard to work with the first time. But once implemented, it's a breeze to work with. thanks Joshua
Thanks for this clear and understandable tutorial
Wish i could like it twice. Thank you very much
Great explanation and demo!! Logically broken down to the different parts and explained their roles. I smashed that like buttom, subscribe, and left a comment so they YT gods will bless you
12:17 if you are on strict mode (it is enabled by default) line 17 should be like this:
constructor(private store: Store);
to avoid this error with selector:
"app.state.ts(4, 3): 'todos' is declared here."
life saver
thank you bro omg
This needs to get upvoted more, this is actually a life saver
Thank you.
This is great tutorial and easy to understand! Perfect and thanks!
Excellent teaching, josh...
Thanks a lot! Will dive into it deeper now.
Thank you so much. Absolutely goldxgold content!
Simple question (that may be convoluted): "reducers are pure functions", none the less, when creating new todo (11:44), we create an ID with a simple method, yet could be RNG stuff... So function is not so pure anymore. Is it really important for NgRx to have pure reducer functions? (caching stuff may happen).
Thanks for great content!
With React, pretty much all devs will also know Redux. But with Angular I'll bet a good percentage don't know NgRx. If nothing else, I think getting familiar with NgRx will give Angular devs a competitive edge in the job market
Thanks for a very detailed tutorial! Keep it up :)
Beautifully explained! thank you!
18:29 why using a Promise here instead of Observable with RxJs ?
One thing I'd suggest is to keep the todo state folder under the todo tree, because you reference 'TodoService' in your effects file. This I consider an anti-pattern where narrowed application contexts (in this case the Todo context) are referenced by global contexts such as application state.
Joshua you are an angel sent from the Angular gods! haha
Hi Josh, in the TodoState you defined the "status" and "error" properties. How do we actually go about using these properties for example to show a loading spinner during loadTodos and an error message on loadTodosFailure actions? Do we have to create new selectors for each?
Usually you should create a vm selector, which is a view model selector, for that specific view, that selector should have the shape of {isLoading, error, content} and the component should handle those
first, Thanks! super helpful video. I have only one question, what is the 'from' call wrapping saveToDos @20:46 ?
Easily my most favorite video about NgRx
Absolutely fantastic. Thanks
great video! just one quick question:
in the effect code (around minute 19:20) why is loadTodosSuccess being called like so while loadTodosFailure is wrapped in an "of" call?
I think it has something to do with it being an "error". When there is an error you want the operator flow to continue instead of ending there. So the catchError function is returning an Observable (because of the "of"). I just remember from other RxJs tutorials that in the catchError operator you still have to return an observable.
I wish RUclips didn’t have a “hearts” feature on comments, so questions like these would show up instead of the channel’s hearted comments showing up at the top. Those are always just “great tutorial” or whatever and helps no one
great video. really helped break things down for me in my head. 🙏
ruclips.net/video/HGI2QMyM-zw/видео.html
Hi Joshua,
thank you for this tutorial. I have a question. WhenI call the select method, it appears an error on the selectAllTodos parameter which was only solved when I assigned to store the type in the constructor: private store: Store.
I found this solution on stack but on this tuto you didn't use this solution, so I want to know if it's a change to the new library?
Also apart from the fact that we have a second state, is there any use for using AppState in the selector ?
Thank you
Thank you for sharing your solution. I ran into the same problem and tried to find a fix for the whole day..
Very good explanation, Thank you !!
Very nice video! Thanks for a good explanation and some awesome insights!!!
Thank for the explanation. NgRx is trying to simulate a single processor taking multiple request in a stack. It is more work than it really worth. Can use Rxjs and local store to achieve the same result and faster and easier?
Awesome video!
Thank you for this great video!
Can you explain why did you use promise in the api call, instead of using only observable? Cause in my head I don't see any reason so convert results to promises and them convert it back to observable
Thank you. Clear explanation ❤
Nice example, i just have a soubt, if you want to create a filter and aply that filter to the list of todos, you would create a new state for the results or it will be a new efect aply to the main todo array?
A wonderful tutorial 😍
Thanks a lot , great video helped me a lot understanding the NgRx state management. I am relatively new to Angular and have one question : In a larger application since the data that will reside in the 'AppState' will be larger , it is going to affect the performance of the app.
Could you make a video about Angular - NX Workspace and Using Ngrx for state management?
The problem with introducing complex concepts like these is that it is so hard to fit into your mind, that some think they got it, but are actually implementing it wrong, or overuses it, making the already complex concept even more unnecessarily complex, I would even call it wrong.
Absolutely, I’m in a mess right now where NgRX was used simply to store data from an api call and then be used across a handful of components in a single feature. Everything that is being done could have been accomplished with a single service but instead there’s reducers, effects, states and a mess of logic being thrown around just to handle get/add/remove from a list of items.
Nice explanation. Much appreciated!
thank you for this amazing explantation
Excellent, this really helped me understand NgRx and made my code look a lot more elegant. ❤️
How do you not get the TypeScript errors that I get though?!...
One thing i've struggled with when working with NGRX is how to handle data when for example you are logging in. Should I just dispatch a bunch of fetch actions in app component when user is logged in? Or should I have a side effect that listens to a loginSuccessful action and then do all dispatches there? Never found a best practice in this scenario, any advice?
How would you recommend the setup for ngrx when using nx
So informative, thanks a lot!
Is createFeatureSelector a replacement/option for appstate
Thank you so much bro. Can anyone help me to show where saveTodo$ effect was trigged?
Just keep making this videos you are awesome
Can you replace it completely with basic https and RxJs services? And how you go refactoring 5 stores that uses 4 APIS for immutable data?
Yes you can just use standard services/RxJS for state management - NgRx is never required, it's more a question of when it makes sense to use it. I'm not sure what you mean with your second question.
Thank you so much, this was super helpful!
This looks so elegant but it is based in some abstract concepts, and quite honestly, it is just a simple todo application (could be coded so much simpler than this).
Hello Joshua, so if I understand it, you need to dispatch in ngOnInit action like allTodos and then in code above you are listening to again all todos selector as $observable and then show data in html using | async pipe, right? and also this dispatch is listening in effects from where you get data like from api calls. So basically, there is always two listeners for one action like selector in template and also effects that listen to this kind of action.
Great video, thanks for sharing!
hi joshua , with your video passing from react to ngrx in angular was very simple! i just can't build the code , terminal provides me a lot of errors , do you have any suggestions how to build correctly the project ? thanks
Hi Joshua, I am about to start a Angular project based on data integration & data pipeline. Where a new data can be created, from multiple data sources (Amazon RDS, Hadoop, PosGres, stc.) . So should I use NGRX or not ?
Hey Josh,
How NgRx should be structured in apps broken down by feature modules. For example like the one from your video 'How to structure your Angular apps like a Googler' ?
Hey check out this page in the docs: ngrx.io/guide/store/feature-creators - the general idea is that you register a feature with the StoreModule.forFeature() static method - in the end your global store is basically an object storing values, and by creating a feature your feature module will get a "slice" of that global state dedicated to it (e.g. a property within that object) and that property will be named whatever you register your feature as using forFeature()
I'm picking up build errors. Have there been updates since the video was made? The video seems newer than the timestamp of the repo. Another discrepancy I've noticed is that the VSC project title is not the same as the repo. The package.json seems outdated as well. I enjoy your YT presentations that take developers to the next level.
How do you call api url from the services?! I'm always confused by this pattern, where is http request?
The general idea with this pattern is that you trigger an action when you want to load something, and you have an effect that is listening for that action. That effect triggers the HTTP request and if it is successful the effect will trigger some sort of "success" action with the data from the HTTP request as the payload, or an "error" action if it fails.
Really nice video❤️❤️tysm
Redux is probably one of the best patterns created
thanks for the content
thank you very much fella
Well explained
Hi, thx for tutorial.
I wanter to learn ngrx like 3 months ago but I didn't feel like it till I watched this video.
But I ran into some issues.
Right now I'm working on a school project and I'm using prisma + express as a backend but I have problem with saving all object at once I would need to call add or remove just for one item per action and not whole list / state but don't really know how to do that yet.
Also second problem is that as you used {content:string} as a type for adding Todo I'm using interface but unfortunately I found out that actions adds that type property to object when they get dispatched and that makes me problem when I send it to the back end because type isn't defined in my interface Is it possible somehow remove that property ? i found delete fucntion from ts but i cant call it because when i loop through my last before sending in service obviously type isn't know as property since actions forcefully add's it to it.
is this the trend in angular? should I invest learning these?
Generally simpler state management solutions are used, either people rolling their own state management or simpler libraries like NgRx Component Store or Elf. The global NgRx Store outlined in this video is generally used by larger teams working on more complex apps. It's still a pattern worth learning though, this whole idea of having actions that are interpreted by reducers to change state is quite common.
@@JoshuaMorony thank you, I think I'm going to give it a try. based on your teaching it's not that really hard to understand. and I think it's much more readable.
Very nice sir
does it give us more code to type ?for component we have to created 4 files ? does it give us more code to write ?\
There is more code to write, especially initially, but it might also save you having to write more code later in some circumstances.
@@JoshuaMorony later means ? do you mean in refactoring ?
@@balajibalamurugan8053 no moreso when you are continuing to build the application - it's a bit of work up front to set up the reducers, but once everything is in place you have a very streamlined and organised way to add new features
@@JoshuaMorony yeah ok !understood