title: How to unit test react hooks by shallow mounting React Functional components?
body: <p>Is there a way to test functional components built using React hooks by shallow mounting the component. I came across Enzyme not supporting <code>useEffect</code> (<a href="https://airbnb.io/enzyme/#react-hooks-support" rel="nofollow noreferrer">https://airbnb.io/enzyme/#react-hooks-support</a>)  and other hooks with shallow rendering a component and I don’t want to get into mount.</p>
  
  <p>Also came across <code>react-testing-library</code> being a new and popular alternative. Is it better option compared to Enzyme? I already have <code>Enzyme</code> used for testing class based components. So, there is a pain involved in rewriting those.</p>