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
axios.all([getUserAccount(),getUserPermissions()]).then(axios.spread(function(acct,perms){// Both requests are now complete}));
to this:
axios.all({acct: getUserAccount(),perms: getUserPermissions()}).then(function(results){// Both requests are now completevaracct=results.acct;varperms=results.perms;});
This makes adding new requests to all simpler because you don't have to keep track of the order of items. This is how I normally do stuff when I use async. Just thought I'd suggest it.
The text was updated successfully, but these errors were encountered:
I generally like the concept, however axios.all is just an alias for Promise.all. I don't want to deviate from the ES6 spec as it makes the API less predictable.
Like async's
parallel
. So it could go from this:to this:
This makes adding new requests to
all
simpler because you don't have to keep track of the order of items. This is how I normally do stuff when I useasync
. Just thought I'd suggest it.The text was updated successfully, but these errors were encountered: