title: Got error when importing function react componets
body: <p>I have a function componet in react which get some props as follow:</p>
  <pre><code>export default function ThermoBreastCancerIntroPage(props) {
    console.log('rest is logged in is')
    console.log(props.is_logged_in);
    const [is_logged_in, set_is_logged_in] = useState(props.is_looged_in);
    const [fname, set_fname] = useState(props.fname);
    const [lname, set_lname] = useState(props.lname);
  </code></pre>
  <p>in my index.js I import it and then want to use it</p>
  <pre><code>import ThermoBreastCancerPage from &quot;views/LandingPage/ThermoBreastCancerPage.js&quot;;
  
      ReactDOM.render(
        &lt;Router history={hist}&gt;
          &lt;Switch&gt;
             
            &lt;Route path=&quot;/thermo-breast-cancer&quot; component={&lt;ThermoBreastCancerPage is_logged_in='false' fname='' lname='' /&gt;} /&gt;
          &lt;/Switch&gt;
        &lt;/Router&gt;
  </code></pre>
  <p>But in above, I got error</p>
  <pre><code>Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
  </code></pre>
  <p>when I change to component={ThermoBreastCancerPage} I wont get any error but I have to pass props in some way. I am new to react and not sure where I am doing wrong?</p>