Live data from Hacker News

Next.js App Router Update

nextjs.org

1–10 of 93 posts

Re: Next.js App Router Update

#2
I really want to like Next.js but as a recent adopter (within the last year) I’m not sure I’m going to stick with it.

I find the “new” way to write Next apps incredibly confusing. Everything is now a mix of server and client and there’s so much rendering complexity. Im sure for big ambitious companies this focus on performance is great, but I find that it greatly compromises developer experience.

I’ve also found the piecemeal transition to the new app router pretty challenging as I’ve had to feel around to find the issues (of which there have been a few)

That said, Vercel makes deployment so easy so I’ll probably stick around a while longer to see if things get ironed out.

Re: Next.js App Router Update

#3
post #2

I really want to like Next.js but as a recent adopter (within the last year) I’m not sure I’m going to stick with it. I find the “new” way to write Next apps incredibly confusing. Everything is now a mix of server and client and there’s so much rendering complexity. Im sure for big ambitious companies this focus on performance is great, but I find that it greatly compromises developer experience. I’ve also found the…

What's a full-stack TypeScript-based alternative that's good enough for most of us? I constantly bump into the complexity of NextJS myself, but so far I've powered through the pain.

Re: Next.js App Router Update

#4
I gave up on Next.js because of it's architecture. It does not support normal authentication use cases via cookies eg. include the logged in user's name. Next.js wants to prerender a page such that any user can be served it. This means that your first paint will always be incomplete since you have to fill in all the user specific stuff client side.

I ended up migrating to Remix and my application was easy to build how I wanted with cookies. Next.js API for working with cookies wasn't that good either.

Unfortunately, this update did not include anything to address this. Next.js seems fine to use if you are making a landing page or some site which does not require authentication, but I wouldn't use it for anything complex.

Re: Next.js App Router Update

#5
> Pages and App toggles: You can switch between learning the Pages Router or App Router documentation using the button on the left side of the documentation. Further, you can filter search results based on your router choice.

Thank you so much for this! I recently gave up on trying to learn Next.js because the tutorial and the vast majority of the documentation only covered the "old" Pages Router way of doing things.

Re: Next.js App Router Update

#6
post #2

I really want to like Next.js but as a recent adopter (within the last year) I’m not sure I’m going to stick with it. I find the “new” way to write Next apps incredibly confusing. Everything is now a mix of server and client and there’s so much rendering complexity. Im sure for big ambitious companies this focus on performance is great, but I find that it greatly compromises developer experience. I’ve also found the…

What's a full-stack TypeScript-based alternative that's good enough for most of us? I constantly bump into the complexity of NextJS myself, but so far I've powered through the pain.

Vite with trpc? I personally don't use the backend functionality of NextJS at all, I have my own backend (in Rust but I'd do the same in Node as well) that communicates via GraphQL to the frontend in NextJS, it's pretty nice.

Re: Next.js App Router Update

#7
The new docs are extremely annoying; if you're still running a legacy app, sometimes you get put into a doc for a feature you think exists, but then you realize it's not for the right version you're running.

Also the new app routers are very confusing. There are concepts of a layout, template, page, etc. While it's nice to have server rendering at this level, it's difficult to understand what is bubbling which direction, and when to use a layout vs a template. Sometimes after building something one way (eg using layout), you realize you actually need to build it using the other in order for specific features to work.

Old Next was great and simple- new Next has become increasingly frustrating and not so easy to adopt.

Re: Next.js App Router Update

#8
Vercel as a hosting provider is almost purposely slow (at least on the free tier) for app router based sites. RSC files in particular take 500ms to 2000ms to start serving those static files.

Re: Next.js App Router Update

#9

I gave up on Next.js because of it's architecture. It does not support normal authentication use cases via cookies eg. include the logged in user's name. Next.js wants to prerender a page such that any user can be served it. This means that your first paint will always be incomplete since you have to fill in all the user specific stuff client side. I ended up migrating to Remix and my application was easy to build ho…

You can use getServerSideProps to look at the cookies before rendering the page for a user.

It’s slightly annoying though since you can’t use both getServerSideProps and getStaticProps on the same page.

Post reply on HN