Several states in the same feature module

The following scenario can be found in the Chapter9/TypesDemo folder of the code repository. 

OK, so now we know about the ActionReducerMap type, and we also know that we can provide a type to the forFeature() method and make it safer to use. What happens if we've got several states in our feature module, what then? The answer is quite simple, but let's first have a closer look at what we mean exactly by several states. Our counter module contains the counter.value state. This is displayed in our counter.component.ts. If we want to add a counter.list state, we need to add the supporting constants, reducers, actions, and a component file so we can properly display it. Our file structure should therefore ...

Get Architecting Angular Applications with Redux, RxJS, and NgRx now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.