title: Invariant Violation: Hooks can only be called inside the body of a function component
body: <p><strong>TL;DR:</strong> I'm trying to use the new <code>react-hooks</code> api, but I keep getting an Invariant Violation error when calling the <code>setState</code> hook, but it keeps failing.</p>
  
  <pre><code>import React, { useState } from 'react';
  
  // type State = {
  //   heading: string;
  // }
  
  const Text = () =&gt; {
    const initialState = 'Heading'.toUpperCase();
  
    const [heading, setHeading] = useState(initialState);
  
    return (
      &lt;header&gt;
        &lt;h1&gt;
          {setHeading('Brussels')};
          {heading}
        &lt;/h1&gt;
      &lt;/header&gt;
    );
  };
  
  export default Text;
  </code></pre>