title: react-test-renderer's create() vs. @testing-library/react's render()
body: <p>I'm new to React and confused about all the testing libraries.  I got my test code to work but it seems redundant to have to call <code>create()</code> from react-test-renderer in order to use its <code>toMatchSnapshot()</code> and have to call <code>render()</code> from @testing-library/react in order to use its assertions such as <code>getByLabelText()</code>.</p>
  
  <pre><code>import {render} from '@testing-library/react';
  import {act, create} from 'react-test-renderer';
  
  it('renders a login screen', () =&gt; {
      let mockInitialState: AppState = {
          auth: initialAuthState
      };
  
      let component = &lt;Root initialState={mockInitialState}/&gt;;
  
      let tree = null;
      act(() =&gt; {
          tree = create(component);
      });
      expect(tree).toMatchSnapshot();
  
      const {getByLabelText, getByText} = render(component);
      expect(getByLabelText(/Email Address.*/));
      expect(getByLabelText(/Password*/));
      expect(getByText('Sign in'));
  });
  </code></pre>
  
  <p>As a newbie, it's hard for me to understand the difference between all these React libraries.  But I'm thinking there must be a simpler way.</p>
  
  <p>How can I simplify my test code so I only have to call one thing that renders the component so that I can do snapshot testing and more specific assertions?</p>