Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External state object #21

Closed
charlessolar opened this issue Aug 2, 2017 · 3 comments
Closed

External state object #21

charlessolar opened this issue Aug 2, 2017 · 3 comments

Comments

@charlessolar
Copy link
Owner

Entities can really be divided into 2 operations, reading and writing.

Only 1 entity should be opened for writing, whereas many entities can be opened for reading. To more easily define and enforce this best-practice we can support a "State" object which can be read from the store and hydrated but cannot raise new events.

The idea being when an entity is defined the user will define the read and write side separately and entities that depend on information in other entities will receive access to the state of the entity not the entity itself.

@Narvalex
Copy link

Narvalex commented Aug 2, 2017

I aggree with you, and that approach looks cleaner as you can see here

@charlessolar
Copy link
Owner Author

Yes, something more like this model too

@charlessolar
Copy link
Owner Author

Fixed in v0.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants