title: React hooks: What/Why `useEffect`?
body: <p>Concerning the newly proposed <a href="https://reactjs.org/docs/hooks-reference.html#useeffect" rel="noreferrer">React Effect Hook</a>;</p>
  
  <ol>
  <li><p>What are the advantages and use cases of the <code>Effect</code> hook (<code>useEffect()</code>)?</p></li>
  <li><p>Why would it be preferable &amp; how does it differ over <code>componentDidMount/componentDidUpdate/componentWillUnmount</code> (performance/readability)?</p></li>
  </ol>
  
  <p>The documentation states that:</p>
  
  <blockquote>
    <p>Mutations, subscriptions, timers, logging, and other side effects are not allowed inside the main body of a function component (referred to as React’s render phase).</p>
  </blockquote>
  
  <p>but I think it was already common knowledge to have these behaviors in lifecycle methods like componentDidUpdate, etc. instead of the render method.</p>
  
  <p>There's also the mention that:</p>
  
  <blockquote>
    <p>The function passed to useEffect will run after the render is committed to the screen.</p>
  </blockquote>
  
  <p>but isn't that what <code>componentDidMount</code> &amp; <code>componentDidUpdate</code> do anyways?</p>