DEV Community

Discussion on: Simple state management in Angular with only Services and RxJS

Collapse
 
ronancodes profile image
Ronan Connolly 🛠

Very well put together, succinct article!
We don't use NgRX at my workplace, but we do have a couple of data source services.
They kind of just grew organically.

I see the benefits of following your rules of immutability, having a private behaviourSubject, and the getter and setter. Also the second readonly observable which pipes the behaviourSubject is very nice.

Is the term storeService a widely used suffix?
I currently use dataSourceService.

Collapse
 
avatsaev profile image
Aslan Vatsaev • Edited

Thanks!

Is the term storeService a widely used suffix?

nope it's up to you to name it, I usually name it something like TodosStore

Collapse
 
ronancodes profile image
Ronan Connolly 🛠 • Edited

I think I prefer the suffix store over dataSource.
Also the ngrx stuff talks about stores a lot. Seems to be a popular term.