嘿,我花了几个小时努力用 Nextjs 设置一个基本的 Bootstrap 导航栏。
而且我还认为我还有其他问题而不是显示的错误消息。
也请让我知道如何使整体变得更好!我应该使用 _app.js 而不是 Layout 吗?
页面/index.js
import Layout from "../components/Layout";
class Page extends React.Component {
render() {
return (
<Layout>
<div className="container">
<div className="starter text-center">
<h1>Bootstrap starter template</h1>
<p className="lead">
Use this document as a way to quickly start any new project.
<br /> All you get is this text and a mostly barebones HTML
document.
</p>
</div>
</div>
</Layout>
);
}
}
export default Page;
Run Code Online (Sandbox Code Playgroud)
关于页面看起来几乎一样
组件/Header.js
import Link from "next/link";
class Header …Run Code Online (Sandbox Code Playgroud)