I am getting the following error every time I try to use react hooks in my funtiom:
TypeError: react__WEBPACK_IMPORTED_MODULE_1___default is not a function or its return value is not iterable
Following is my code:
import './RouteDetails.css';
import useState from 'react';
...
...
..
export default function RouteDetails() {
const [show, setShow] = useState(false);
return(
<div>
<Row className="route-details-heading">
<Col className="d-none d-sm-block" md={4}><b>Route Name</b></Col>
<Col className="d-none d-sm-block" md={4}><b>Difficulty</b></Col>
<Col className="d-none d-sm-block" md={1}><b>Length</b></Col>
<Col className="d-none d-sm-block" md={1}><b>Time</b></Col>
</Row>
</div>
)
}
React and React-dom is of the same version. Can anyone please tell me what I am doing wrong here? Also, I am not using jest