import Navbar from "./components/Navbar"
import Main from "./components/Main"
export default function App() {
return (
<div className="container">
<Navbar />
<Main />
</div>
)
}
So basically I haven't fully been able to understand the difference between import and export and they both seem to be pretty much the same? But if that's the case how come if I replace import Main from "./components/Main"
with var Main = require("./components/Main")
this doesn't work anymore?