title: Using toJSON or not with Snapshot testing with Jest
body: <p>I am new to React, and I am testing my components. When implementing snapshot testing I have found these two approaches:</p>
  
  <p><strong>Approach 1</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>import React from 'react'
  import renderer from 'react-test-renderer'
  import Projects from './Projects'
  
  it('renders Projects component properly', () =&gt; {
    const tree = renderer.create(&lt;Projects /&gt;)
    expect(tree).toMatchSnapshot()
  })
  </code></pre>
  
  <p><strong>Approach 2</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>import React from 'react'
  import renderer from 'react-test-renderer'
  import Projects from './Projects'
  
  it('renders Projects component properly', () =&gt; {
    const component = renderer.create(&lt;Projects /&gt;)
    const tree = component.toJSON()
    expect(tree).toMatchSnapshot()
  })
  </code></pre>
  
  <p>Is it important to call <code>toJSON</code> in the component (approach 2) or can you just pass it directly to check <code>toMatchSnapshot</code> (approach 1)? Can somebody explain me the difference between both approaches in terms of performance?</p>