no dependencies in react useEffect?

前端 未结 0 1555
旧时难觅i
旧时难觅i 2020-12-04 07:53

in what case I shouldn\'t put the empty array [] as dependcies in react useEffect? like

React.useEffect(() => {
    if (true) {
      doStuff()
    }
    r         


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