I removed everything not relevant from the code, strictly asking about the prevState parameter inside the this.setState function.
As you can see, I didn’t use the “prevState” and the code worked.
When I went to see their answers, they’ve removed the prevState entirely from the code.
Arrow functions can be abbreviated depending on the information available. prevState and this.state.counter + 1 effectively do the same thing hence “the code worked”.
This article might also help explain the situation.
Why it is used in the seed code but not the solution is probably just some inconsistency. Either the seed code should not have it, or the solution code should. Otherwise, it just creates confusion. It works both ways but it is still inconsistent the way it was presented.
I updated the solution to use the seed code as that is easier than changing the seed code.