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

In the Async Example not clear how to support add action which needed to call out to server #152

Open
tirams opened this issue Mar 4, 2016 · 1 comment

Comments

@tirams
Copy link

tirams commented Mar 4, 2016

In the example http://fluxxor.com/guides/async-data.html the addaction updates the list locally. Let say the list has many users adding to it so the add method would need to reload the list with its entry updated. How would that be done, since the actions shouldn't initiate other actions .

@friendOfOurs
Copy link

Why not just modify the ADD_BUZZ_SUCCESS event so that it doesn't accept the id of submitted item, but the list (of all items, retrieved from server). And onAddBuzzSuccess smth like this:

 onAddBuzzSuccess: function(payload) {
     this.words = payload.updatedWord;
     this.emit("change");
 },

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