These are chat archives for AngularClass/angular2-webpack-starter

25th
Oct 2016
Marinho Brandão
@marinho
Oct 25 2016 05:56
@yogesh7607 I have used Redux in my app which was based on angular2-webpack-starter… I just don’t have a guideline, but can answer questions if you have. Did you try it already? Did it fail?
@tstirrat15 I’m not aware about Angular2’s own built-in state management… how is that?
the 3 popular ways of state management I know in ng2 are: ng2-redux, ngrx and pure RxJS. ng2-edux and ngrx are Redux, the only difference is that ng2-redux uses Redux.js while ngrx uses RxJS observables. Pure RxJS would be the manual and harder way, but would work too. In my team we opted for ng2-redux.
trsh
@trsh
Oct 25 2016 07:19
@tstirrat15 the 404 error is for font request. For example. http://localhost:3000/node_modules/bootstrap/fonts/glyphicons-halflings-regular.woff2
Seems logical, that assets would not load from node_modules dir. But than those instructions are incomplete?
trsh
@trsh
Oct 25 2016 09:43
Anybody? Im stuck for 2 days now
pubkey
@pubkey
Oct 25 2016 12:35
@trsh can it be that limit=10000 doesnt match the size of your woff-file?
yogesh7607
@yogesh7607
Oct 25 2016 13:14
@tstirrat15 , Thanks for the comment. I guess you meant to say "since Angular 2 already ships with RxJS, we did not have to bring in any new libraries" ... i found this in this article on googling after reading your comment, thanks. https://vsavkin.com/managing-state-in-angular-2-applications-caf78d123d02#.2icde4dka
trsh
@trsh
Oct 25 2016 13:16
@danielsun174 mhm..
yogesh7607
@yogesh7607
Oct 25 2016 13:16
@marinho, did you have any specific reason about using Redux over builtin RxJS?
trsh
@trsh
Oct 25 2016 13:19
@danielsun174 nop. not the problem :(
Tanner Stirrat
@tstirrat15
Oct 25 2016 16:30
@yogesh7607 yeah, it seems that the typical way that you handle state in Angular2 is to put it into services, and then use observables to push data around
@trsh do you know for sure that that file is available at that location?
it sounds weird to me that it's trying to serve directly out of node_modules
Marinho Brandão
@marinho
Oct 25 2016 20:11

@yogesh7607 when we made such decision, we actually had no knowledge enough to stabilish reasoning… we just didn’t know exactly what ngrx did and using RxJS for managing state wasn’t an option in our short knowledge.

but now, a few months later, yeah, I think the manual way of managing state with RxJS would be through services, but it looks to me harder to maintain and potentially hackish, as you have to design that, as services are very flexible and could be used for pretty much anything or any approach.

Redux is opinionated: the state must be global and immutable and any change must always go through the combined reducers, being reachable to any of them, any component can subscribe to any level of the state, etc… I’m aware that can be done with RxJS too, but you basically have to maintain that by your own convention and that sounds pretty fragile to me.

Redux is also veeeeery simple, way simpler than RxJS for beginners or “full stack developers” who do 1 adventure frontend task per week and aren’t very familiar with the code and RxJS’ tricks.

That’s my 2 cents