Generating a store

This command sets you up completely for using the @ngrx/store. It also allows you to set up feature stores. So, by typing the following two commands, you can generate a whole lot of files:

ng generate module countryng generate store country

The preceding code will generate a module as well as add a feature state. Running the following command will add the set up needed to work with the store, as well as set up the devtools that come with NgRx:

ng generate store State --root --module app.module.ts

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.