我在苦苦思索该怎么做: const [stateOne, setStateOne] = useState(); setStateTwo(); /* not before data is fetched and setStateOne is complete */
},[]) 这在概念上是正确的,并且可以在useEffect中异步运行这样的任务吗?
我是新的反应,我得到的Objects are not valid as a React child (found: object with keys {id, description, status,在使用map函数运行对象时,我会得到空错误。在传递对象JSON.stringify()时,我将得到确保该API返回数据的字符串。
这是我的资料。import React, { useState, useEffect } from 'rea