Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there really a significant difference between having two stores called UserStore and MessageStore, and having a single Store with state like {users: userState, messages: messageState}?


I think it really depends on your implementation. For readability, having a `UserStore` and `MessageStore` in one place might get to be troublesome, especially when it comes to separating out business logic. But that said, things like `Om` like to push the idea of a single application state object, so I can forsee an implementation where you have multiple `Store`s that sit atop a single `ApplicationStore`, such that you deal with the keys of `users` and `messages` separately while they are attached to the same parent `ApplicationState` object (which can be immutable and persistent as well).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: