DEV Community

Discussion on: Architecting the Store in NGRX

Collapse
 
sebastiandg7 profile image
Sebastián Duque G

Thanks a lot for the article! Just a question:

It is certainly recommended to have your client application entities in a /models folder. When defining your state entities, and taking into a account the flat store structure over the nested one (which implies the other entities ids references in your entities attributes), what do you recommend to use?

  • The feature module entities previously defined? And designing them taking into account the required data to work with a flat store architecture (with @ngrx/entity).
  • Creating a new MyEntityStoreModel extending MyEntityModel which comes from the feature model? So you can add any necessary properties.
  • Creating a totally different entity for the store (and some mappers)?

Again... thanks a lot! Currently enjoying reading all your articles.