My team is redoing an old ionic app and it needs easily understandable state-management. I have found Redux Toolkit to be great in past projects, though they were React apps.
Is it possible to use Redux Toolkit with an Ionic 6 Angular app? Would it be easier than using Ngrx? I haven't found any clear answer to this. Also, if it is possible, is there a straight-forward way to set it up and use it or do we have to set it up kind of hacky?
Also, if it's possible, are there any examples anywhere?
CodePudding user response:
Though it might be possible to use Redux Toolkit in Angular, it seems to be a little hacky to use.
If it boils down to decide whether Ngrx or Redux Toolkit should be used, the answer is, in my opinion, always Ngrx as it is the de facto standard for Angular Apps. I do believe that for an experienced Redux Toolkit user, the switch to Ngrx is easy as it uses the Redux Pattern.
But there might be a middle ground for your team. If you want to use Redux Toolkit because the knowledge is already there, you could use Ngrx as bridge between your Angular App and the Redux Toolkit. See here for more Inforamtion: https://dev.to/lacolaco/angular-using-ngrx-store-with-redux-toolkit-5467