An honest opinion about the App
vs Pages
router
#59373
Replies: 21 comments 14 replies
-
I appreciate making this a poll, but I'm not sure I can simplify my opinion to app router or pages router. I was really excited for app router but there is a lack of documentation (for common use cases), performance, and stability around Next.js 13 and 14. In it's current state I am extremely disappointed with the app router. However, I could see myself being happy with app router if Next.js stops working on new features and spends the next year+ solving performance, stability, and documentation (videos, podcast, more example apps, etc.). For example: there seems – to me – to be a lack of documentation on handling/sharing authentication between server components and client component when using an external API that was not build through Next.js. Should I just not use server component for any api endpoint that is authenticated? Are server components best when only used for public routes? I love the simplicity of data fetching within server components, but once a request requires an auth token this all becomes way more confusing. Pages to App router (with server component) is such a huge shift in how React works. I'm sure there are a lot of implications here that the community is lacking clarity on. I would really love some more help on understanding best practices moving forward. I fear Next.js team is moving so fast they don't even know what the best practices are anymore. |
Beta Was this translation helpful? Give feedback.
-
Hi @RemyMachado You are absolutely right sir I am using NextJS since start and I became fan of it when it supported server side rendering. I was previously using React but when I learned React dosent have SSR then I searched for further frameworks and found NextJS to be highly beneficial in that case. Here are some of the very important points which @rauchg sir please consider.
|
Beta Was this translation helpful? Give feedback.
-
@RemyMachado I just found a way to use App Router in NextJS with SSR always and here is an article. |
Beta Was this translation helpful? Give feedback.
-
I recently migrate to next app router. I'm quite satisfied with it (I'm also happy with the dev experience, though it was a big confusing at the beginning), I got slightly better performance, but I had to stay with the 13.4.12 to avoid LCP high values. |
Beta Was this translation helpful? Give feedback.
-
Hi Devs I think now app router is full stable the only problem is most
developers dont know how to use it properly.
…On Tue, Mar 12, 2024 at 5:03 AM hi ***@***.***> wrote:
Hello, devs
As you can see we have to build the app with App router.
App router has a lot of useful functions but it has yet some problems.
Because it is on growth now.
But I believe Vercel will make perfect App router!.
❤️
—
Reply to this email directly, view it on GitHub
<#59373 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOEOKDOROPCGQSRWZO6H42TYXZH7NAVCNFSM6AAAAABALLLNIKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DONJSHEZTS>
.
You are receiving this because you commented.Message ID: <vercel/next.
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
There is no page transition support in the app router for a year now, so definitely pages for me |
Beta Was this translation helpful? Give feedback.
-
Multi-language in App router much more difficult to implement than on page router 😢 |
Beta Was this translation helpful? Give feedback.
-
just add passing data to root layout and share data between server component and pass data to layouts and server component will much better |
Beta Was this translation helpful? Give feedback.
-
When they strongly recommend using app router, it means that the page router is likely to be deprecated or undergo major changes in future versions. Even if the page router can still be used currently, for projects that do not require an app router, especially those new projects with their own backend API, it may be worth considering an alternative framework as a better choice. |
Beta Was this translation helpful? Give feedback.
-
I noticed that the App router is slower than the Page router even though both are newly created. The App router has a response time of 80ms-130ms, while the Page router only takes 14ms |
Beta Was this translation helpful? Give feedback.
-
App router is terrible and if you are using a Windows machine, it gets worse than that. Its been so much of a bother recently that I have started leaning towards Remix because the app router is just not stable enough. The developer experience has gone down drastically compared to the Pages router. The build and load times have gone through the roof in development and lets not forget the biggest issue - App router hot refresh isn't HOT at all. The documentation is extremely poor and incomplete. Its a disappointment to say the least since NextJS used to be my go to tool for any kind of web work. Its all good though, we get cool landing pages and billboards! |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, I hope you are doing well. In conclusion, I have preferred the page router for almost 2 years now and I'm certain to continue with the page router. If the page router gets deprecated, I will switch to Remix or Laravel. I hope the Vercel team understands the priorities for developers. |
Beta Was this translation helpful? Give feedback.
-
App router is just a mess created by vercel team. I just used int a project and it is confusing everytime with client or server components.
There are more use cases like this. |
Beta Was this translation helpful? Give feedback.
-
I've really tried to love the app router... I just can't support a framework that releases version after version filled with problems. Do you know how terrifying it is to build out a beautiful application only to discover a critical error, leading you to a closed GitHub issue with 50 comments in it. You'd think the issue being closed would mean there's a solution right? Nope. Some problems have been unsolved for years, and all the issues around it are closed because the Next team claimed to have either solved it, or the stale-bot closed it after two weeks of inactivity. So... you can build a whole app, discover some critical error, and now what? You can try switching Next versions, but where one problem gets solved another one manifests. On some versions build fails with cryptic errors, on another build works but in production all your images are broken, or your instance has symptoms of a memory leaks caused by them. I am completely turned off by Next v13+ and I avoid App router like the plague and will not migrate to 13+ until these issues are solved. I no longer use Next as part of my go-to stack. Incredibly disappointed. |
Beta Was this translation helpful? Give feedback.
-
### Too painful the app dir... switching to pages read-more no comment... maybe I'm wrong, but show me a real world example with complete SSR 👀 |
Beta Was this translation helpful? Give feedback.
-
Which is better to use for performance: app-based routing or page-based routing? |
Beta Was this translation helpful? Give feedback.
-
Using page router is simplicity in terms of developer experience and time to build the entire application, using app directory makes things more complex, like using authentication systems, intermixing of client components and server actions, all just makes development really worse and too much time consuming, taking away most of time focusing on the framework complexity instead of focusing on features and getting things done. I hope that vercel team will make things simpler for app directory or fallback to page router. As of now I go through app directory docs, lot of places app directory docs still have references or example from page router, which itself makes learning difficult. Not having proper docs takes away lot of time, with page router we have proper docs, easy to learn and use. |
Beta Was this translation helpful? Give feedback.
-
My app is stable, working great. I am sticking with Pages router. |
Beta Was this translation helpful? Give feedback.
-
Page Router is like 100x simpler and more convenient than the App Router. The App Router is just constant influx of problems. It is constantly breaking with every minor release. New errors and performance degradation issues arise at unexpected pace. All the talk of the App Router being more performant is a complete nonsense as that will entirely depend on the application type and its data access patterns. The whole idea of splitting everything into tiny files and scattering it all over the filesystem reminds me a lot of Java - more unnecessary cognitive load. Sometimes you need to create just wrapper components to satisfy some 'use client'/'user server' warning. Honestly it is not worth it. If you value your sanity stick to the Page Router. A fork of NextJS will be imminent if the page router gets deprecated. |
Beta Was this translation helpful? Give feedback.
-
I want to share my honest opinion about the direction that Next.js has been taking with the
App
router, because I really care about this project.I have been a user of Next.js since version 10 and have been stunned by this framework capabilities. I used Next.js (
Pages
router) with my clients and with my personal projects and it was always a great experience. It solved with consistency and simplicity most of the use cases and sometimes just a little configuration was enough to solve edge cases.Now, I have been using the
App
router since a year for one of my new clients and let me say that it's still a good tool, but the complexity that came with this new router is disappointing.I'm glad the
Pages
router is still maintained to this day, but I believe it's supposed to become deprecated.It's obvious to me that the previous router had a far better developer experience.
I'm wondering if I'm an ousider or not and curious to know what the Vercel team thinks about it and what feedback they received apart from this discussion.
Also, I understand that the new router supports new react features (e.g., server components), but is it enough?
I found one advantage of the
Pages
router is to be clear and unambiguous about how to do server vs client side instructions. TheApp
router on the other hand seems to erase the border between these two and I find it hard to implement the simplest things.Thank you for hearing my opinion, and I'd be glad to hear yours.
With respect to all contributors,
1k votes ·
Beta Was this translation helpful? Give feedback.
All reactions