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

Change notify_listeners to diff state #2

Open
alexdovzhanyn opened this issue Jul 7, 2018 · 0 comments
Open

Change notify_listeners to diff state #2

alexdovzhanyn opened this issue Jul 7, 2018 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@alexdovzhanyn
Copy link
Owner

Currently, when notify_listeners is called, we pass the entire new state object to the listener. This is fine, but a good improvement would be to only pass the parts of the state that have changed, because listeners have access to latest state from the store at all times anyway, and will likely only care about new state.

Since any change to the state can have additions or deletions, perhaps this can be best implemented as a diff? The listener would then be passed an object with :additions and :deletions which they can deal with as they choose to.

@alexdovzhanyn alexdovzhanyn added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jul 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant