setCount(count+1) is taking the current value of 'count', adding 1 to it and then passing this to our setCountto update our state. Since count is a
const, we cannot reassign the 'count' variable, React is simply updating the value of 'count' under the hood using the setter function.
count++ can be written as count=count+1. As you can see, you are trying to change/re-assign the value of a const, which is impossible. Hence, the error.
Okay Victoria Lo. I understand know, thanks for answering.