Next.js Tutorials All In One
<h1 id="nextjs-tutorials-all-in-one">Next.js Tutorials All In One</h1><pre><code class="language-json">{
"scripts": {
"dev": "next dev",
"start": "next start",
"build": "next build",
"export": "next export",
"lint-auto-fix": "next lint --fix",
"lint": "next lint"
},
}
</code></pre>
<p>https://nextjs.org/learn/basics/create-nextjs-app</p>
<h2 id="pages">Pages</h2>
<p>In Next.js, a page is a React Component exported from a <code>.js</code>, <code>.jsx</code>, <code>.ts</code>, or <code>.tsx</code> file in the pages directory.<br>
Each page is associated with a route based on its file name.</p>
<blockquote>
<p>路由映射关系</p>
</blockquote>
<p><code>pages/about.js</code> => <code>/about/</code></p>
<pre><code class="language-jsx">function About() {
return <div>About</div>
}
export default About
</code></pre>
<p>https://nextjs.org/docs/basic-features/pages</p>
<h2 id="refs">refs</h2>
<p>https://www.cnblogs.com/xgqfrms/p/14406311.html</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/mTz0GXj8NN0?start=19" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<p>https://www.youtube.com/playlist?list=PL4cUxeGkcC9g9gP2onazU5-2M-AzA8eBw</p>
<hr>
<div>
</div>
<hr>
<blockquote style="display: flex; flex-flow: column; align-items: center; justify-content: center; text-align: center; border: none">
<h3><strong><span style="font-size: 16pt; color: rgba(0, 255, 0, 1)">©xgqfrms 2012-<span data-uid="copyright-aside">2020</span></span></strong>
<p><span style="font-size: 18pt; color: rgba(0, 255, 0, 1)"><strong>www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!</strong></span></p>
<p><span style="font-size: 18pt; color: rgba(0, 255, 0, 1)"><strong>原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!</strong></span></p>
</h3></blockquote>
<hr>
</div>
<div id="MySignature" role="contentinfo">
<div style="display: flex; flex-flow: column nowrap; align-items: center; justify-content: center;">
<p>本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/16538429.html</p>
<p style="color: red; font-size: 23px; margin-top: 5px; margin-botom: 5px;">未经授权禁止转载,违者必究!</P>
</div>
<hr/><br><br>
来源:https://www.cnblogs.com/xgqfrms/p/16538429.html
頁:
[1]