filters component is just a dumb component that exposes:
This should be straightforward to you, don’t forget to add the new sub reducer to your store:
Previously our smart component was
AppComponent now it will be the
The first thing we’ve added is the
The second thing is the
changeFilter method that just dispatches the
GET_TODOS actions when the filter changes.
Our goal is always to show the latest value the user has selected.
We only need the filter value once, when Angular creates the component. We can accomplish this with the
... read the whole story at medium.com.
take operator from Rx.