title: React Hooks Wrapper not getting updated after state change in useEffect
body: <p><strong>Current behaviour</strong></p>
  <p>I'm using a functional component with a <code>setState</code> hook in <code>useEffect</code>. The state variable that is set inside <code>useEffect</code> is wrapped over the return statement to render the JSX for the component.</p>
  <p>When I debug into it, the component renders with the correct state variable but my wrapper in my test does Not show the correct information.</p>
  <p><code>wrapper.update()</code> isn't fixing this issue.</p>
  <p>Below is a snippet of what I am trying to achieve:</p>
  <pre><code>const DummyComponent= ({}) =&gt; {
      const [selected, setSelected] = React.useState(false);
  
      useEffect(() =&gt; {
        setSelected(true)
      }, [someDependency])
  
      return (
        { 
           selected &amp;&amp; (
           &lt;div id= 'container'&gt;
              {childComponents}
            &lt;/div&gt;)
         }
      );
      })
  
  it('test', () =&gt; {
       const wrapper= mount( &lt;DummyComponent  /&gt; ); 
      wrapper = wrapper.update(); // this doesn't fix my problem   
      wrapper.find('#container')first().props().onClick();
      expect(wrapper.toMatchSnapshot());
  });
  </code></pre>
  <p>I am getting the below error:</p>
  <pre><code>Method “props” is meant to be run on 1 node. 0 found instead.
  </code></pre>
  <p><strong>Expected Behaviour</strong></p>
  <p>After state update in <code>useEffect</code> re-render should be triggered in test case and element with <code>id=&quot;container&quot;</code> should be found.</p>
  <p>Note: This is <strong>not same</strong> as <a href="https://github.com/enzymejs/enzyme/issues/2305" rel="nofollow noreferrer">https://github.com/enzymejs/enzyme/issues/2305</a></p>
  <p> </p>