Printing variable after fetching data from API gives empty and after that filled value is printed

后端 未结 0 1135
再見小時候
再見小時候 2021-01-12 13:38

Say I fetched an API in React and set its value in datalists

const [dataLists, setdataLists] = useState([])

const fetchAPI = () => {
        axios.get(`/a         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题