I am trying to update state value immediately with the use of prevState but value does not change. I know seState is asycnc function but If I use prevState, should not be update immediately? Where I do the mistake?
count: 0
this.setState((prevState) => ({
count: prevState +1
}));
console.log(this.state.count+" count")