title: Performance difference from putting function outside of React component?
body: <p>I know that it's going to be small, but is there a performance difference if you put functions outside of a React component? </p>
  
  <p>Eg version 1:</p>
  
  <pre><code>const handleFetch = () =&gt; {
      // Make API call
  }
  
  const MyComponent = () =&gt; {
      useEffect(()=&gt;{
          handleFetch();
      })
      return(&lt;p&gt;hi&lt;/p&gt;)
  }
  </code></pre>
  
  <p>Vs version 2:</p>
  
  <pre><code>const MyComponent = () =&gt; {
      const handleFetch = () =&gt; {
          // Make API call
      }
  
      useEffect(()=&gt;{
          handleFetch();
      })
      return(&lt;p&gt;hi&lt;/p&gt;)
  }
  </code></pre>
  
  <p>In version 1 would <code>handleFetch</code> not be recreated when <code>MyComponent</code> re-renders? </p>