Angular NGXS Tutorial - An Alternative to Ngrx for State Management

  Рет қаралды 61,110

DesignCourse

DesignCourse

Күн бұрын

Пікірлер: 75
@abirmahmud3903
@abirmahmud3903 2 жыл бұрын
You taught the basics of Ngxs very specific and precisely only in 20 minutes. Very helpful for beginners.
@utkarshpant5297
@utkarshpant5297 3 жыл бұрын
Can you please make a tutorial on Akita State Management
@thomaslohmann9361
@thomaslohmann9361 6 жыл бұрын
Good tutorial! A video about CRUD operations with the http client and ngxs would be great!
@esra_erimez
@esra_erimez 4 жыл бұрын
Agreed
@victorharuna8647
@victorharuna8647 4 жыл бұрын
Please I'm a beginner,I will appreciate if I have a link to a full course ,I don't mind paying for it,I'm seriously desperate to learn ngxs for my state management
@victorharuna8647
@victorharuna8647 4 жыл бұрын
Yes ,I'm in support of this
@ManasKumar-lk6lw
@ManasKumar-lk6lw 4 жыл бұрын
please have a video on Unit testing/integrated course with ngxs
@FidelGuajardo
@FidelGuajardo 4 жыл бұрын
The simpler syntax of Ngxs is so much nicer than Ngrx. Thank you for helping me to understand this.
@nonfaktor5215
@nonfaktor5215 4 жыл бұрын
thanks for talking about the static @Selector method in the state class. the docs are quite poor for ngxs...
@DesignCourse
@DesignCourse 6 жыл бұрын
Just yesterday, Jeff from the "Angular Firebase" channel did a tutorial on the same subject if you want to learn more: kzbin.info/www/bejne/gp_JZ62MorVmgsU
@MStoica
@MStoica 6 жыл бұрын
Hi, Link leads to a short video (6s) that just says "Hey Google!". I think it was changed in the meantime? I suppose it's this one: kzbin.info/www/bejne/iXjNYmSgac2ro8k Both great introductions! Any plans for a course on Redux with Angular, that uses NGXS instead of NGRX? :D
@jayaraut
@jayaraut 2 жыл бұрын
can you tell about mocking store and state( specially @Selector()) using karma jasmine.
@JayTailor45
@JayTailor45 3 жыл бұрын
That was so cool. I love how much less we have to do comparted to NGRX.
@abhijitboda
@abhijitboda 5 жыл бұрын
can you explain why you user "static readonly type= 'something'" while it was never used somewhere else?
@jinxiantan5121
@jinxiantan5121 5 жыл бұрын
That is the name of the state, must be unique.
@akshatahegnaik7887
@akshatahegnaik7887 3 жыл бұрын
Type 'Tutorial | null' is not assignable to type 'NgIterable | null | undefined'. getting this error - could you please help me sort this.
@f19-x9k
@f19-x9k 3 жыл бұрын
Hi, on your read component instead of assigning the variable tutorials$ type Observable, just declare it, without defining any type, that is, just type tutorial$;
@kandanceferguson7102
@kandanceferguson7102 Жыл бұрын
@@f19-x9kCan you explain why? Just trying to make sense of the error. Thank you!
@davidhenzl1871
@davidhenzl1871 Жыл бұрын
@@kandanceferguson7102 I just changed type Observable to Observable. I think that array of Tutorials is iterable, so there is no error :)
@daking9629
@daking9629 6 жыл бұрын
i am 17 years old and you are best channel on youtube
@DesignCourse
@DesignCourse 6 жыл бұрын
Hey, thanks!
@chrischappell7643
@chrischappell7643 6 жыл бұрын
u should do homework and learn more about your shool's lesson instead of see this, LMAO
@DesignCourse
@DesignCourse 6 жыл бұрын
Hell no Edric! This is the best type of education: stuff that you can use in the real world. School is largely busy work and remembering to forget. ;)
@daking9629
@daking9629 6 жыл бұрын
I have a game site and I earn a lot of money and I'm still studying I want to become a programmer and I will specialize in this field so What is the problem of starting from now?
@magomedsouleymanov9946
@magomedsouleymanov9946 6 жыл бұрын
Stop saying shi. please ! This is the right thing to learn ! Instead we would like to see people like you staying on university and homework level. RESPECT TO YOU BRO IF YOU ARE 17 AND IF YOU UNDERSTAND THIS.
@ronjaknudtsen5908
@ronjaknudtsen5908 6 жыл бұрын
How would you do async calls to a database, or use a service in combination with the actions?
@solderon
@solderon 4 жыл бұрын
Hello, thanks for the content very clear and easy to understand, although, the fetch tutorials action is missing (I'm saying this as I'm used to adding fetching tutorials into the store pattern with NgRx) So I would appreciate it if you could add this part to your tutorial, so I can see if I'm doing it the right way :p
@agnieszkalundy3434
@agnieszkalundy3434 6 жыл бұрын
I've watched both ngxs and ngrx tutorials, they are very helpful. Thanks!
@ramanha6097
@ramanha6097 8 ай бұрын
The Written tutorial link is broken
@MultiShiv19
@MultiShiv19 6 жыл бұрын
Hi Gary, I wanted to know, at 4:02 why you prefer to import Tutorial from `./../` instead of simply doing `../` ?
@carrillocarlosce
@carrillocarlosce 6 жыл бұрын
It's very good to know that you are making this effort to bring us the last and new tecnologies out there, very thank you for you very well explained tutorials (y)..
@hermesherrera2659
@hermesherrera2659 6 жыл бұрын
very simple! Great work Gary.
@j4nch
@j4nch 4 жыл бұрын
Where the call to the backend would be placed? I'm not huge fan of having to create those effects in NGRX and duplicating everyting in 3 differents actions? (Still waiting for the follow up video ^^). 2 years after, would you still consider it for a project?
@irhamputra3666
@irhamputra3666 5 жыл бұрын
This seems like Redux pattern easy to understand but I wish there's some middleware like Redux-Thunk or Saga to make async
@andresm9051
@andresm9051 4 жыл бұрын
Great video, one question can I have multiple states like tutorials[] and userProfile or do I need to use one global interface that gather up userProfile and inside of it tutorials[] ? thanks a lot.
@rembautimes8808
@rembautimes8808 3 жыл бұрын
Good tuto-rail 😃. Helps explain the concept
@nielsSavantKing
@nielsSavantKing 4 жыл бұрын
But if I click a item for removing it will open a new tab
@geocine
@geocine 6 жыл бұрын
I like the ngxs approach better than ngrx , thank your for introducing this
@j4nch
@j4nch 4 жыл бұрын
Two questions: 1) Where would you put the logic to update the backend? 2) I cannot figure out what is the point of having "Actions"? What is the advantage between this and calling directly a method on the store to update? That would reduce the amount of code and remove this cumbersome payload declaration. Same with getState/patchState, why this is not defined in a parent class
@JayTailor45
@JayTailor45 3 жыл бұрын
1. Now that you have global single store, Basically you can put your backend calls anywhere. But I would suggest to create separate service.
@j4nch
@j4nch 3 жыл бұрын
@@JayTailor45 Yeah but who call this service? At which moment?
@JayTailor45
@JayTailor45 3 жыл бұрын
@@j4nch You would add service call in the actions. So main logic will lies in the action and you don't have dependency on the component. If you add calls in the action then on component. You would just need to dispatch new action. For example: this.store.dispatch(new Login(email, password)); Check this doc. It will give you more clarity on what I want to say :) www.ngxs.io/concepts/state#async-actions
@laytonmiller5865
@laytonmiller5865 6 жыл бұрын
Good tutorial, thanks. It looks like its very similar to ngrx. I am wondering how those store files will scale with all actions/selectors etc in there. I really like the usage of decorators, helps clarify intent.
@aradazad3092
@aradazad3092 5 жыл бұрын
Please Turn subtitle contributions on for all videos
@ningzedai9052
@ningzedai9052 5 жыл бұрын
Does anybody know how to use ngxs router to navigate back/forward ? There is only one action provided by ngxs for navigation which is 'Navigate' class. Does ngxs have the similar actions such 'go', 'back', 'forward' that are provided in NgRx ?
@int3rhard
@int3rhard 6 жыл бұрын
Please, add video how to use @ngxs/effect. Thanks!
@agasthya3693
@agasthya3693 6 жыл бұрын
Thers no such thing called @ngxs/effects. In NGXS we have only Action and Store. GoodBye reducer and effects
@gulaykulekci8728
@gulaykulekci8728 2 жыл бұрын
Helpful tutorial. Thank you.
@robbiesmith79
@robbiesmith79 4 жыл бұрын
I got all the way to the end until you switched the tutorial$ out for a @Select decorator. Got this error now: ERROR in src/app/read/read.component.ts(17,6): error TS2345: Argument of type 'ReadComponent' is not assignable to parameter of type 'ComponentClass & Record'.
@robbiesmith79
@robbiesmith79 4 жыл бұрын
I figured it out. @20:02, that line should be (added the array[] because the TutorialState has a defaults section with an array of tutorials): @Select(TutorialState.getTutorials) tutorials$: Observable
@jamesbest2221
@jamesbest2221 6 жыл бұрын
Thanks so much Gary! Awesome!
@DesignCourse
@DesignCourse 6 жыл бұрын
Thanks man!
@jeffleigh5291
@jeffleigh5291 6 жыл бұрын
Something I'd like that I haven't seen done yet is a tut on ngxs that covers how you accomplish the same thing as ngrx effects but using ngxs
@manjunathah5857
@manjunathah5857 5 жыл бұрын
Good Introduction for NGXS.. Thanks
@oleersoy6547
@oleersoy6547 6 жыл бұрын
Gary - What do you think of this: github.com/datorama/akita It comes with a CLI and it looks like we can just add a @AkitaStore decorator to models and have the Akita CLI generate all the code for the Stores...we have to do this to get intellisense ...
@ergceme
@ergceme 6 жыл бұрын
It was very helpful for my project. thanks mate
@kamalkamals
@kamalkamals 6 жыл бұрын
That's a good simple example to explain how use NGXS, but what about effects ?
@StefanoGabriele1983
@StefanoGabriele1983 5 жыл бұрын
Kamal Sahmoud i think that the effects in redux are the @action in ngxs
@reddyashok9
@reddyashok9 6 жыл бұрын
That's a great one. Thank for the vlog
@nurboljalmukhambetov4231
@nurboljalmukhambetov4231 6 жыл бұрын
Gary,Thank you for your videos!!! Your videos so cool and awesome!! Hello from Kazakhstan!!!)
@nanasarathi
@nanasarathi 5 жыл бұрын
Nicely explained... Thanks
@imhappynow8471
@imhappynow8471 5 жыл бұрын
Thank you so much for the great intro.
@sveinsoermo9883
@sveinsoermo9883 6 жыл бұрын
Very good video and the same goes for ngrx ones. Can U PLS make an example with NGXS using a data source, say Firestore. Very much thx in advance..:-). BTW NGXS looks to me as a better choice than ngrx....
@pattierney6845
@pattierney6845 6 жыл бұрын
I agree ..full CRUD with NGXS with user item model with firebase backend. =:∆)
@andresgutierrez3965
@andresgutierrez3965 4 жыл бұрын
thanks for the video
@spragucm
@spragucm 3 жыл бұрын
Fantastic
@AdamChad-v8u
@AdamChad-v8u 3 ай бұрын
Uriah Park
@alxizr
@alxizr 5 жыл бұрын
@DesignCourse #DesignCourse really hope you read this! I wonder, do you copy from other tutorials just for the sake of pushing videos to KZbin? It seems that you do not really understand what you are doing or trying to achieve. All your Angular related videos are published after alot of other videos published by other developers/youtubers (nevermind their names but i am sure you know who i am talking about) who actually know their business and can provide better flow and explanations. Word of advise, if you don't know something then don't fake it till you make it. 30 minutes of video where 10 spent for promotion and other bs, another 10 for the specific content and the last 10 for prolonging with no reason.
@DesignCourse
@DesignCourse 5 жыл бұрын
Johnny, if you look at the release dates of my Angular tutorials/crash courses, you'll find that 90% of them come out very soon after a new release of Angular, usually well before any other KZbinr. "Angular ngrx" on KZbin shows 1 video older than mine from what I can see (one I never watched). Maybe the opposite is my problem? Maybe I should study up more if you feel I don't know the subject well enough? 🤣 And dude, come on, 10 minute promo? In this 28 min video, the content starts at 1:30.
@DesignCourse
@DesignCourse 5 жыл бұрын
Also, this particular video is a bit older and definitely around the time I likely just started learning about ngrx. I'll be the first to admit if there's something I don't understand, and maybe at times I do screw up certain topics, but I don't ever rush or intentionally put out content that will get me raped by the subscribers. Overall, I've done pretty well at that with something around 97.5% like to dislike ratio. This particular video is def. on the weaker side. Thanks for the input though.
@alxizr
@alxizr 5 жыл бұрын
@@DesignCourse I never meant to burn you, if you know what I mean. I believe that you approach to an audience who is getting into development and less to those who are more experienced and that may reflect on the like/dislike ratio. This particular video is about ngxs a topic which I am doing research about. I was looking into a lot of resources to see what is out there tutorial wise and this video was not as good as I thought it to be. I also watched other videos you made and they are better by all means. I'm assuming that other topics you are more comfortable with because you practice them on a daily basis at your work. State management takes time to sink in, no matter how good of a programmer one is.
@DesignCourse
@DesignCourse 5 жыл бұрын
@@alxizr oh this is NG..X..S, my bad, thought it was NGRX. Yeah, at the time of releasing this vid, it was very new.
@alxizr
@alxizr 5 жыл бұрын
@@DesignCourse and you promised follow ups for this topic. we will be waiting. Maybe you should create a whole series about it here on KZbin then we all can bebefit from it.
@moisesalvinmiguelflores923
@moisesalvinmiguelflores923 2 жыл бұрын
If there's a problem importing: NgxsReduxDevtoolsPluginModule NgxsLoggerPluginModule Just run this: npm run postinstall
@tiago9488
@tiago9488 3 жыл бұрын
Thanks a lot Gary! Awesome!
Ngrx Store Tutorial for Angular - Learn State Management for Angular
27:47
I bet you can understand NgRx after watching this video
22:48
Joshua Morony
Рет қаралды 194 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Getting Started with Angular 6 Material (Tutorial)
19:48
DesignCourse
Рет қаралды 112 М.
Getting Started with NGXS 18 and Angular 18
29:53
Code Shots With Profanis
Рет қаралды 1,9 М.
Learn Angular 5 in less than 60 Minutes - Free Beginner's Course
58:36
Build your First Angular PWA from Scratch (Angular 6 PWA Tutorial)
26:21
Learn How To Use State Management in Angular with NGXS
20:40
Code Shots With Profanis
Рет қаралды 12 М.
How Angular Signals and RxJS Work Together
16:15
Deborah Kurata
Рет қаралды 31 М.
RxJS Observables Crash Course
1:13:05
Traversy Media
Рет қаралды 274 М.
State Management in Angular - Do I need Redux & NgRx? (2021, Advanced)
24:41
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН