Promise.all() 與async/await(和axios). Javascript. Jun 30, 2019. 本來一直都用迴圈去處理同時發多個request(很好懂但有點難處理Error),這次親自來試 ... ... <看更多>
Search
Search
Promise.all() 與async/await(和axios). Javascript. Jun 30, 2019. 本來一直都用迴圈去處理同時發多個request(很好懂但有點難處理Error),這次親自來試 ... ... <看更多>
Two issues jump out: Your getData never returns anything, so its promise ( async functions always return a promise) will be fulfilled with ... ... <看更多>
import React, { useState, useEffect } from "react";. import axios from "axios";. const fetchDataCall = async ({ api }) => {. let apiReturn = await axios. ... <看更多>