Style Guide
Last updated
Below are suggestions for naming and style conventions.
A state should always be suffixed with the word State. Right: ZooState Wrong: Zoo
States should have a .state.ts suffix for the filename
State interfaces should be named the name of the state followed by the Model suffix. If my state were called ZooState, we would call my state interface ZooStateModel.
Selects should have a $ suffix. Right: animals$ Wrong: animals
Plugins should end with the Plugin suffix
Plugins file names should end with .plugin.ts
Global states should be organized under src/shared/state. Feature states should live within the respective feature folder structure src/app/my-feature. Actions can live within the store file but are recommended to be a separate file like: zoo.actions.ts
Actions should NOT have a suffix
Unit tests for the state should be named my-store-name.state.spec.ts
Actions should NOT deal with view related operations (i.e. showing popups/etc). Use the action stream to handle these types of operations
Last updated

