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
With the move to async / await, I think mostly everything involving Accounts has a promise-based alternative with the *Async suffix, e.g. Accounts.createUserAsync. I noticed that Meteor.loginWithPassword is still callback-based only. Should it have a promise-based alternative?
IMO, it seems like it should since I imagine going forward people will be more comfortable writing all their Meteor code in a promise-based style. I suppose the workaround is making everyone write their own wrapper to promisify it which seems not great.
If y'all agree, there might be other methods that also should get a promise-based alternative. I didn't look at them all. I just happened to notice this one while porting a project to 3.0.
The text was updated successfully, but these errors were encountered:
I don't remember on which version it was added, but Meteor have the Meteor.promisify helper available in both client and server from what I remember, so we have an easy way to convert the callbacks to promise.
But agree, probably all methods that uses callback should have a promise alternative - which internally would just wrap the method with the promisify helper.
With the move to
async / await
, I think mostly everything involving Accounts has a promise-based alternative with the*Async
suffix, e.g.Accounts.createUserAsync
. I noticed thatMeteor.loginWithPassword
is still callback-based only. Should it have a promise-based alternative?IMO, it seems like it should since I imagine going forward people will be more comfortable writing all their Meteor code in a promise-based style. I suppose the workaround is making everyone write their own wrapper to promisify it which seems not great.
If y'all agree, there might be other methods that also should get a promise-based alternative. I didn't look at them all. I just happened to notice this one while porting a project to 3.0.
The text was updated successfully, but these errors were encountered: