title: TypeError: react__WEBPACK_IMPORTED_MODULE_2___default(...) is not a function. How do I solve this?
body: <p>I was using React when I got the following error.</p>
  
  <p><code>TypeError: react__WEBPACK_IMPORTED_MODULE_2___default(...) is not a function</code></p>
  
  <p>How do I solve this?
  I have added the code below.</p>
  
  <pre><code>import React from 'react';
  import LoginForm from './loginForm'
  import useState from "react"
  
  function LoginPage(){
      const[details, setDetails] = useState({
          username: '',
          password: ''
      });
      function handleChange(event){
          const updatedDetails = {...details, [event.target.name]: event.target.value};
          setDetails(updatedDetails)
      }
      return(&lt;LoginForm details={details} onChange={handleChange}/&gt;)
  };
  
  export default LoginPage;
  </code></pre>
  
  <p>The other component is :-</p>
  
  <pre><code>import React from "react";
  import 'bootstrap/dist/css/bootstrap.min.css';
  import { Jumbotron, Container } from 'reactstrap';
  import { Button, Form, FormGroup, Label, Input, FormText } from 'reactstrap';
  
  function FormPage(props){
    return (
      &lt;Jumbotron fluid&gt;
      &lt;Container fluid&gt;
      &lt;center&gt;&lt;h1 className="display-3"&gt; Log IN&lt;/h1&gt;&lt;/center&gt;
      &lt;p className="lead"&gt;Please Enter your Details Here&lt;/p&gt;
      &lt;/Container&gt;&lt;br /&gt;
      &lt;Container fluid&gt;
      &lt;Form&gt;
          &lt;FormGroup&gt;
              &lt;Label for="username"&gt;Username&lt;/Label&gt;
              &lt;Input type="textarea" name="username" id="username" placeholder="Enter your Username Here" value={props.details.username} onChange={props.onChange}&gt;&lt;/Input&gt;
          &lt;/FormGroup&gt;
          &lt;FormGroup&gt;
              &lt;Label for="password"&gt;Password&lt;/Label&gt;
              &lt;Input type="password" name="password" id="password" placeholder="Enter your Password Here" value={props.details.username} onChange={props.onChange}&gt;&lt;/Input&gt;
          &lt;/FormGroup&gt;
          &lt;Button color="success"&gt;Submit&lt;/Button&gt;
      &lt;/Form&gt;
      &lt;/Container&gt;
      &lt;/Jumbotron&gt;
    );
  };
  
  export default FormPage;
  </code></pre>
  
  <p>PS: I am typing this because StackOverflow is asking me to add some more details as my question is mostly code. Sorry.</p>