is anybody experienced the same way?
useEffect (() => {
setNoItems(count);
setTitlex(title);
if(operator==1 || operator==0){
setMinusx(operator);
setChecking(0);
}
if(operator==2 || operator==0){
setPlusx(operator);
setChecking(0);
}
setSelectedItem(checking);
//all sets are props
console.log("check "+checking);
});//issue about this is that the last component in array cause a React app freeze
useEffect (() => {
setNoItems(count);
setTitlex(title);
if(operator==1 || operator==0){
setMinusx(operator);
setChecking(0);
}
if(operator==2 || operator==0){
setPlusx(operator);
setChecking(0);
}
setSelectedItem(checking);
//all sets are props
console.log("check "+checking);
},[count,operator,checking]);//this time I add dependency, issue about this is that the moment I click the component React app freeze
Any help would be appreciated! I am a newbie in hooks