Managing state in Angular 2 using RxJs
Loïc Marcos Pacheco
21511

This is a great read, and one of the few places where we can read about how to use RxJs to build Angular 2 apps. I learned recently via this recent comment by Andre Staltz https://www.reddit.com/r/javascript/comments/3zr6i0/conversation_whats_the_core_differences_between/cypd5fk?context=3 that we should avoid Subject if possible. I think in this case it would better to make the Subject private and return subject.asObservable(). This is so that only the store can decide when to trigger a state change. By making it public we are opening the door for any part of the app to send any state at any time. I think the ability to send a new value should be constrained inside the Store service. Someone want to send a value they call a method in the store that will do some validation, etc.

Not sure what this all means, still trying to make sense of how to build Angular 2 apps with RxJs.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.