I'm so so sorry for wasting people's time on such a stupid error. But it's driving me crazy, I don't know why its occurring. To my knowledge I've done everything correct. So I'm trying to import a component called NewSiteNav
into my NewSite
component. The path I am directing to is correct, I even know because I'm using the VSC tool that helps you autocomplete path selections. I have the import written correctly, have tried it with and without these {}
and I have exported the NewSiteNav
correctly using both export default class...
at the beginning and export default NewSiteNav
at the end. Please help
NewSiteNav
component:
import React, { Component } from 'react';
import { Navbar, Nav } from 'react-bootstrap'
export default class NewSiteNav extends Component {
render() {
return (
<div>
<Navbar>
<Navbar.Brand href="#home">React-Bootstrap</Navbar.Brand>
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
<Nav className="mr-auto">
<Nav.Link href="#home">Home</Nav.Link>
<Nav.Link href="#link">Link</Nav.Link>
</Nav>
</Navbar.Collapse>
</Navbar>
</div>
)
}
}
NewSite
component:
import React, { Component } from 'react'
import { NewSiteNav } from '../components/NewSiteNav';
class NewSite extends Component {
render () {
return (
<div className="App">
<NewSiteNav />
<div className="lander">
<h1>New Site</h1>
</div>
</div>
)
}
}
export default NewSite;