title: Accessing the State of a Functional Component with React Hooks when Testing with Enzyme
body: <p>I was wondering how to test a state change of functional components with the <code>useState</code> hook with Enzyme. Usually the test would be something along the lines of <code>expect(wrapper.state()).toEqual(expectedState)</code> but I get the error:</p>
  
  <pre><code>ReactWrapper::state() can only be called on class components
  </code></pre>
  
  <p>I know that Hooks are still in the alpha stage and things like <code>shallow</code> still don't work but I was wondering is there a way to this yet?</p>