Asynchronous function keeps reading old value of global variab;e

前端 未结 0 1431
长情又很酷
长情又很酷 2021-02-15 19:04

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

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

    React.useEffect((         


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