React Hook useEffect has a missing dependency : what if I don't want to add the dependency?

前端 未结 0 896
南笙
南笙 2020-12-18 08:11

Let\'s say I have the following code :

useEffect(() => {
    if (toto) {
        setHasSubTabs(true);
    } else {
        setHasSubTabs(false);
    }
             


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