You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to add a 'Flux Compatibility' section with the following contents:
Flux Compatibility
Flux apps can use ComposerJs models as the basis for Flux stores, as follows:
Each model will be encapsulated within a store using composerjs.createModel().
The store will register itself with the global dispatcher.
Stores will either avoid the use of handlers that invoke hasUpdated(), or will dispatch an action within the stores on('internal-update') call-back, rather than invoking processUpdates() directly.
This would require us to make the following changes:
Stop using ASAP to automatically process updates, and instead require a new model.processUpdates() method to be fired — this is related to QUESTION: Should we get rid of ASAP? #38.
Create a new internal-update callback that fires after hasUpdated() has been invoked, and use ASAP to ensure it only fires once, allowing non Flux apps to simply invoke model.processUpdates() when the event fires.
Rename model.notifyListeners() to model.processUpdates() as it's the same thing.
I'd like to add a 'Flux Compatibility' section with the following contents:
This would require us to make the following changes:
model.processUpdates()method to be fired — this is related to QUESTION: Should we get rid of ASAP? #38.internal-updatecallback that fires afterhasUpdated()has been invoked, and use ASAP to ensure it only fires once, allowing non Flux apps to simply invokemodel.processUpdates()when the event fires.model.notifyListeners()tomodel.processUpdates()as it's the same thing.