Live data from Hacker News

Next.js App Router Update

nextjs.org

31–40 of 93 posts

Re: Next.js App Router Update

#31

I have found that it is pretty difficult to find what I'm looking for when searching for articles/issues that relate in any way to the Next router. "App router" and "pages router" were two of the most ungooglable and generic name they could have chosen. Suddenly it is much more difficult to find what I'm looking for in the ecosystem.

Sorry about this. I work on the documentation (author of the post). Are you talking about searching through the docs or searching through GitHub? ARe there specific things you've searched for you couldn't find?

Re: Next.js App Router Update

#32
As a long term user of old school server side frameworks like PHP I very much "got" what the app router is trying to do once I used it, being able to reach into your database from any component without having to build an API layer is incredibly productive. It feels refreshingly old school and new school at the same time. My guess is the majority of the people that don't like the app router are just very used to the modern SPA only way of building websites and will come around over time. I think the idea of server components themselves are incredibly solid and expect to see other frameworks adopt them as well.

Re: Next.js App Router Update

#33
post #26
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…

Dev mode is also a lot slower in app router (well so is production). HMR feels like a crawl even on a fast machine.

Sorry about this. Do you have a GitHub issue with a reproduction we can look into? This is our top priority. In the meantime, I'd recommend continuing to use the Pages Router.

Re: Next.js App Router Update

#34
post #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?

So, what's up with this. How it go from:

Javascript isn't sufficient... to React/Vue aren't sufficient... to Next/Nuxt are

Why didn't the bandwagon just end at the first layer of frameworks?

Re: Next.js App Router Update

#35
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…

(Author) It took me a bit to get used to the new patterns of building with the App Router. It seems harder for folks who have lots of experience building with the previous mental model, versus starting new from scratch. Some unlearning needed.

Apologies that you've ran into a few issues trying things out. We're working hard to patch up some of these. If you have any specifics, please let me know and we can look into them.

Re: Next.js App Router Update

#36
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

Yes, I tried making a middleware for auth, but it just was not working for me. I think I had trouble passing along information to the actual page or something. I also was unable to have my login page handle authentication to set the cookie so I had to do go and make an API for it. I eventually cut my losses and gave up since it felt like my app was going against the grain.

Re: Next.js App Router Update

#37

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 direct…

Apps using the Pages Router aren't legacy, it's totally fine and encouraged to continue using it. We'll continue to support in far into the future and also be adding some new features there, too.

Where are you landing into the docs from, Google? We try to add version history notes at the bottom of docs pages, but maybe we should place these at the top. Open to feedback.

Re: Next.js App Router Update

#38
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…

You might want to consider Qwik which uses React syntax to create components and can be very easy to develop performant web applications

Re: Next.js App Router Update

#39

As a long term user of old school server side frameworks like PHP I very much "got" what the app router is trying to do once I used it, being able to reach into your database from any component without having to build an API layer is incredibly productive. It feels refreshingly old school and new school at the same time. My guess is the majority of the people that don't like the app router are just very used to the m…

I don't get it.

Why not use simple .htaccess to map URLs to folders/files like always? Then, if you simply must use a JS framework like React...run it on those corresponding pages. Why use yet another framework (Next) on top of this to handle such a simple thing?

Post reply on HN