News for hackers. Stuff that matters.
Re:Flux Application Architecture by swah on Friday May 09, 2014 @07:32AM (#7720268)
Can this architecture implement the client-side offline update while network is down? (User clicks a "Like", its marked as Liked even if network is down...)
Re:Flux Application Architecture by jingc on Friday May 09, 2014 @12:28PM (#7721726)
Yup, we've used it that way, and it's easy to implement due to the fact that all changes are expressed as a payload object, which allows you to serialize actions. Optimistic actions (showing the Like when the server hasn't confirmed yet) are built the same way - the stores just need to resolve between the optimistic/offline update and the eventual server response.
Re:Flux Application Architecture by alisnic on Friday May 09, 2014 @07:44AM (#7720307)
This architecture describes how data affects presentation and vice versa. Your question is a bit off, it involves implementation, not structure.
Re:Flux Application Architecture by swah on Friday May 09, 2014 @07:47AM (#7720315)
Ok, I also don't quite understand if the Store has any relation to the server-side database.
Re:Flux Application Architecture by colinramsay on Friday May 09, 2014 @08:41AM (#7720515)
It's just a store. You could write your implementation to store the data anywhere - localstorage, a REST service, the one in the example just keeps it in memory as an array.
Re:Flux Application Architecture by vdm on Friday May 09, 2014 @05:20PM (#7723308)
I think you could do this in a Store component which uses a ServiceWorker.