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

Make Vue-side state updates more obvious #2

Open
jamesnvc opened this issue Feb 19, 2019 · 0 comments
Open

Make Vue-side state updates more obvious #2

jamesnvc opened this issue Feb 19, 2019 · 0 comments

Comments

@jamesnvc
Copy link

Right now, when the Vue view of the app state changes, it sends a pengine event called update, where the input state is the new value of state.

While this is okay for some simple cases (the demo "meals" app here just sanitizes the whole state and the todo demo just does nothing (thereby accepting the new state), it general we'd probably want to know what the old state was.

A simple solution might be to have the event be a functor, like update(OldState), or even something more specifically indicating exactly what values have changed...or perhaps the event should send the old state & the value in the update functor should be NewState?

jamesnvc referenced this issue in swi-prologhackday/vuelogtodo Feb 19, 2019
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

1 participant