Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove `axios.all` and `axios.spread` #1042
Comments
|
Promise.all is not supported in IE at all. Will we then need to use a polyfill? |
|
Axios uses |
|
Should the following in the README example: axios.all([getUserAccount(), getUserPermissions()])
.then(axios.spread(function (acct, perms) {
// Both requests are now complete
}));be replaced with this instead: Promise.all([getUserAccount(), getUserPermissions()])
.then(function ([acct, perms]) {
// Both requests are now complete
});or this: const [acct, perms] = await Promise.all([getUserAccount(), getUserPermissions()])
// Both requests are now complete |
|
@qm3ster i think the second version is better.
|
|
@ChadTaljaardt there's https://github.com/axios/axios/blob/master/README.md#example |
|
I'm interested in #2260 . Do you mind if I try? |
|
Resolved by #2727 |
|
if someone is looking for a typescript solution:
|
Those helpers can easily be replaced with native features (
Promise.alland ES6 parameter destructuring) or specialized libraries, so we should restrict our API to HTTP-related methods.We can deprecate them in 0.x and completely remove then in 1.0.