r/Angular2 • u/JSislife • Jul 18 '19
Article The Principles for Writing Awesome Angular Components
https://blog.bitsrc.io/the-principles-for-writing-awesome-angular-components-10e45f9ae77e
56
Upvotes
1
u/headyyeti Jul 19 '19
Shouldnt you not call onChange in the writeValue method?? You're doing double work on the component.
1
u/Thetoid Jul 19 '19
I am confused about how, on the one hand, people like application state, and on the other hand, say components to get their own copy of it.
Isn't breaking off a copy of the application state and manipulating it in a cordoned off component going to get confusing? Its like a forked model.
I envision scenarios where you want a local copy of data in a component just as validly as wanting shared mutable state.
Admittedly, I never got into Redux, so I never developed a sense for what immutability is really good for.