Live data from Hacker News

Next.js App Router Update

nextjs.org

11–20 of 93 posts

Re: Next.js App Router Update

#11

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.

Except getServerSideProps is no longer used in Next 13 and actually you have no simple access to the request object anymore. Have to write middleware for everything, it is extremely frustrating

Re: Next.js App Router Update

#12
I’ve recently started working with NextJs and absolutely loving it so far.

However, with adopting the App Router there is a big looming question - what happens with frontend state/query management libraries like react-query/trpc?

So far, I’ve seen unergonomic solutions that require the developer to manually hydrate the frontend. Hopefully, over the next few months we discover a solution that “just works”, so we can widely adopt RSC.

Re: Next.js App Router Update

#13
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.

I searched far and wide a few months ago and found these two are the only real contenders:

RedwoodJS

Remix

If I had to compare them, I would label Redwood as more of an "emberjs" type feel, very corpo, angular-js, "enterprise". Remix is more loose and new, fresh ideas that other frameworks have since attempted to copy.

Pick your poison.

Re: Next.js App Router Update

#14
post #11

Earlier quoted context omitted.

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.

Except getServerSideProps is no longer used in Next 13 and actually you have no simple access to the request object anymore. Have to write middleware for everything, it is extremely frustrating

Ah, I see. That’s very annoying.

Re: Next.js App Router Update

#15
post #11

Earlier quoted context omitted.

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.

Except getServerSideProps is no longer used in Next 13 and actually you have no simple access to the request object anymore. Have to write middleware for everything, it is extremely frustrating

To clarify -- using getServerSideProps works for routes defined in the pages/ directory in Next 13, but not for routes defined in the app/ directory. Both pages and app are still fully supported in Next 13. See https://nextjs.org/docs/app/building-your-application/routin...

Re: Next.js App Router Update

#16
post #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.

lots of free tiers have slow start up times when an app has been idle

(eg: heroku and render)

Not 100% sure if this is what is causing that on Vercel, but seems fair to me for free tiers?

Re: Next.js App Router Update

#18
Next and React have gotten way too complicated. I don't want to read twelve pages of documentation to understand how to understand the rest of the documentation.

I've been coding in React for 6 years and in Next for 3 years. My next project will be in Vue.

Re: Next.js App Router Update

#19

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.

Fwiw, iron session is working ok on client and ssr for me.

Re: Next.js App Router Update

#20

Next and React have gotten way too complicated. I don't want to read twelve pages of documentation to understand how to understand the rest of the documentation. I've been coding in React for 6 years and in Next for 3 years. My next project will be in Vue.

Your nuxt project will be Vue?
Post reply on HN