I'm new to react and javascript I just wanna ask if there would be a problem if I will be coding this
let [value, setValue] = useState(0);
// combined with this:
setValue((value += 1));
//instead of doing this:
const [value, setValue] = useState(0);
//combined with this:
setValue((prevState) => {
return prevState + 1;
});
Thankkkk you so mucccch!