I've been trying to figure this out for a while and haven't come across the correct answer.
In the following code:
this.setState(prevState => counter: prevState.counter + 1);
is prevState a reference to the current state? Or is it a copy of it? Is it fine to mutate or should mutating it be avoided?