Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- axios.all([
- axios.get('/comments'),
- axios.get('/images')
- ])
- .then(axios.spread((comments, images) => {
- // do something with both responses
- });
- axios.get('/images')
- .then((images) => {
- // do something with images
- });
- axios.get('/comments')
- .then((comments) => {
- // do something with comments
- });
Add Comment
Please, Sign In to add comment