Let\'s say I have the following code :
useEffect(() => { if (toto) { setHasSubTabs(true); } else { setHasSubTabs(false); }