TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Does anyone "love" Next.js's new App Router?

2 点作者 mikercampbell超过 1 年前
I’m trying to build a new Next.js app after years of working in the API router, getStaticProps days.<p>I am a technophile who checks this site too many times a day to learn the next thing, but I’m struggling to adjust to Next.js 13, “use client”&#x2F;“use server”, Server Components.<p>Has it clicked for anyone else yet? I was loving Svelte but then Runes?<p>Am I just an old crotchety dev who can’t keep up, or is it genuinely a new framework and I need to forget everything I knew about old Next.js?

3 条评论

andher超过 1 年前
I&#x27;m someone who hasn&#x27;t used Next.js a lot, and started building some projects with it (so I don&#x27;t have a very nuanced opinion).<p>In general, I don&#x27;t use the app router because I find it has little benefit as compared to the added complexity for my use cases (mvps &#x2F; smaller projects). I&#x27;ve been bitten a couple times by not understanding the usage patterns and just making stuff &quot;use client&quot;, so I just started using page router again.<p>I assume with more complex projects it helps, but I haven&#x27;t experienced it first hand
评论 #38833333 未加载
jo_beef超过 1 年前
I&#x27;m currently building a project using App Router. Here are my thoughts so far:<p>1. In React Server Components, you fetch data at the component level instead of route level. You can pass the data down as props if it&#x27;s a client component.<p>2. I&#x27;m not sure if HMR is faster in Pages, but in App Router it tends to be slow. I always use --turbo to see changes quickly, but it can still be a bit buggy.<p>3. I just found out that using &quot;use client&quot; directive isn&#x27;t actually sending 100% javascript to the client. It&#x27;s just a replacement of serverSideProps. The component is rendered both on the server and the client, which can be confusing at first. You can disable SSR using dynamic imports.<p>4. I actually like Route Groups, best feature by far.
j4hdufd8超过 1 年前
Why is Next.js popular or useful? I realized after fighting with its complexity that I could have just done the whole thing in normal React.