title: I want to Understand SetState and Prevstate in ReactJS
body: <p>I am new to ReactJS, I am using wizard form in my project which enable user to next and prev step. I copied some code for next button but honestly did't understand what it mean.</p>
  
  <p>Can you please help me understand the following code:</p>
  
  <pre><code>next() {
      this.setState(prevState =&gt; ({ current: prevState.current + 1 }));
  }
  </code></pre>