The standard way to use a React useState Hook is the following:
const [count, setCount] = useState(0);
However this const count
variable is clearly going to be reassigned to a different primitive value.
Why then is the variable not defined as let count
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…