title: How to import a function Component in React?
body: <p>I have a function component that want to import in my app, but I'm getting:</p>
  
  <blockquote>
    <p>Invariant Violation
    Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.</p>
  </blockquote>
  
  <p>Check the render method of <code>ProjectDropContainer</code>.</p>
  
  <p>Here is a sandbox:</p>
  
  <p><a href="https://codesandbox.io/s/brave-voice-bdrx0" rel="nofollow noreferrer">https://codesandbox.io/s/brave-voice-bdrx0</a></p>
  
  <p>I tried importing the ProjectDropContainer like this:</p>
  
  <pre><code>import ProjectDropContainer from "./ProjectDropContainer";
  </code></pre>
  
  <p>or like this:</p>
  
  <pre><code>import {ProjectDropContainer} from "./ProjectDropContainer";
  </code></pre>
  
  <p>But still the same!</p>
  
  <p>The example that I tried to do according to (and it's working) is:</p>
  
  <p><a href="https://codesandbox.io/s/github/emyarod/carbon/tree/dnd-uploader-codesandbox/packages/react/examples/drag-and-drop-file-uploader" rel="nofollow noreferrer">https://codesandbox.io/s/github/emyarod/carbon/tree/dnd-uploader-codesandbox/packages/react/examples/drag-and-drop-file-uploader</a></p>