I am studying React currently.
Can I use "let" in function component instead of using "useState" ?
const Func = () => {
let fruit = "banana";
const changeFruit = () => {
fruit = "apple"
};
changeFruit();
}
const Func = () => {
const [fruit, setFruit] = useState("banana");
const changeFruit = () => {
setFruit("apple");
};
changeFruit();
}