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 just started using refluxjs/react with webpack. I really liked the listenAndPromise async pattern, but I've encountered a problem. I got the following code:
Action:
var ResumeService = require('services/ResumeService');
var ResumeActions = Reflux.createActions({
'save': {
asyncResult: true
}
});
ResumeActions.save.listenAndPromise(ResumeService.save);
So when a user makes change, the resume variable in the store is updated. Now the user wants to save the changes and he hit a button which triggers Action.save(). Here comes my problem: How can I pass the resume variable from the store to the service file above?
The weird thing is that if I do var Store = require('stores/ResumeStore'); in the service file, it has the value object {}, this happens only if I include the store in the service, I think it has something to do with endless loop requiring or something like this. ( Store requires Action, Action requires Service, Service requires Store )
The text was updated successfully, but these errors were encountered:
I just started using refluxjs/react with webpack. I really liked the
listenAndPromise
async pattern, but I've encountered a problem. I got the following code:Action:
ResumeService:
And part of the store:
So when a user makes change, the resume variable in the store is updated. Now the user wants to save the changes and he hit a button which triggers
Action.save()
. Here comes my problem: How can I pass theresume
variable from the store to theservice
file above?The weird thing is that if I do
var Store = require('stores/ResumeStore');
in theservice
file, it has the valueobject {}
, this happens only if I include the store in the service, I think it has something to do with endless loop requiring or something like this. ( Store requires Action, Action requires Service, Service requires Store )The text was updated successfully, but these errors were encountered: