title: What’s the difference between useState and useEffect?
body: <p>I have seen these two new concepts introduced in react v16.</p>
  
  <p>As per my understanding:</p>
  
  <blockquote>
    <p><code>useState</code> is similar like <code>setState</code> with hooks and <code>useEffect</code> works similarly like life cycle methods.</p>
  </blockquote>
  
  <p>Is my understanding correct? If not, what’s the exact difference between <code>useState</code> and <code>useEffect</code>?</p>