Suppose i have:
const [ num, setNum ] = useState(0);
case 1: let newNum = test.getNum();
setNum(newNum);
case 2: setNum(test.getNum());
Is there any difference between these in react??
Via Active questions tagged javascript - Stack Overflow https://ift.tt/Q1fIK3O
Comments
Post a Comment