Introducing NgRx types for setting up the state

Up to this point, we have learned how we move the store state declaration from app.module.ts and register it in each  feature module instead. This will provide us with a little more order. Let's take a close look at the types used for registering state. ActionReducerMap is a type we have been using implicitly so far. We have been using it every time we call StoreModule.forRoot() or StoreModule.forFeature(). We have been using it in the sense that, the object we pass containing state and their reducers consists of this type. Let's prove that is the case by turning to our counter.module.ts:

// counter.module.ts@NgModule({  imports: [    StoreModule.forFeature('counter',{      data: counterReducer        })

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.