Asynchronous function keeps reading old value of global variab;e

前端 未结 0 435
孤城傲影
孤城傲影 2021-02-15 18:59

While writing a React app, I run in a problem that can be simplified like this:

    const [prjToFetch, setPrjToFetch] = React.useState([]);

    React.useEffect((         


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