Skip to content

Conversation

@FredericHeem
Copy link

The idea behind this PR is to avoid calling directly listenAndPromise, instead, pass the function as a new action parameter asyncCall
Before:

let actions = Reflux.createActions({
    signupOrLoginThirdParty: { asyncResult: true },
    signupLocal: { asyncResult: true }
} );

actions.signupOrLoginThirdParty.listenAndPromise( auth.signupOrLoginThirdParty );
actions.signupLocal.listenAndPromise( auth.signupLocal );

After:

let actions = Reflux.createActions({
    signupOrLoginThirdParty: { asyncCall:  auth.signupOrLoginThirdParty },
    signupLocal: { asyncCall: auth.signupLocal }
} );

});
});

it.only("should create action with the parameter asyncCall",function(done){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minus the .only()

@devinivy
Copy link
Contributor

Given that promise support is broken out into the reflux-promise project, we'll have to figure out if this feature is suitable for reflux-core. I definitely do see why this feature may be desirable, but it needs to be balanced against keeping a fairly simple, not-too-too-magical core. In any case thanks for the contribution! We'll try to figure it out soon. CC @spoike @benglass.

@FredericHeem
Copy link
Author

Thanks for the catch, the .only has been removed.

@FredericHeem
Copy link
Author

Any news on that PR ?

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

Successfully merging this pull request may close these issues.

2 participants