3 ms·
I don't know enough about React to say whether or not I like Redux, but I've written enough Angular code to know that Angular's lack of a good state manager is
by onion2k 9y ago
I don't know enough about React to say whether or not I like Redux, but I've written enough Angular code to know that Angular's lack of a good state manager is a problem. A lot of Angular apps end up storing an object in $rootScope that's treated like a global state, and that leads to weird side effects and bugs if you're not careful. Something like Vuex would be be a great addition to Angular.
- Sujan 9y ago> ... $rootScope ... Didn't you write AngularJS code then? As the article riffs about at length, Angular (Angular 2+) and AngularJS (Angular 1) are fundamentally different.
- forgottenacc57 9y agoMaybe I'm doing it wrong but when I (rarely) need state between components I just plop it into a global variable, of which there only ends up being s handful, and it's never been a problem. When I tried to use Redux first it burned my brain trying to grasp its architecture and how to write the various bits of code it needed, all replaceable with this.app.globals.foo=42
- shadow_banned 9y agoYour really a fan of the this.app.globald.foo = 42 eh?
- bdcravens 9y agoLike @ngrx/store? https://github.com/ngrx/store https://github.com/ngrx/store
- hamersmith 9y agoIn Angular 1 I have always used Services for storing state and sharing it between components. In the latest versions of Angular we have started using angular-redux.