Live data from Hacker News

Next.js Layouts RFC: Nested routes and layouts, designed for Server Components

nextjs.org

71–80 of 123 posts

Re: Next.js Layouts RFC: Nested routes and layouts, designed for Server Components

#71

Potentially pretty stupid question, I've never used any React framework like Next.js but I have used React for a while. Are these frameworks always meant to provide the backend as well? I'm using .NET as the backend, so I'm curious if they are something I should look closer at. I mean for SSR they have to run on the backend, but even that I could imagine running parallel to the main backend. I'm just not sure if you…

Next.js works well in the case you have a separate possibly non-Node backend with a JSON (or otherwise non-HTML) API.

Re: Next.js Layouts RFC: Nested routes and layouts, designed for Server Components

#72
post #14

Could a smart person please compare and contrast this RFC and the ideas of remix.run?

According to Ryan Florence (Remix's creator) they are "ripping features straight from Remix". https://twitter.com/ryanflorence/status/1528859776930545665

Ryan and his insufferable Remix evangelists are the reason I never went beyond a quick hello world. And I like the concept.

A while ago he had a Twitter series “spot a React app” where he just shits on other peoples work.

Such an odd way to promote his work.

Re: Next.js Layouts RFC: Nested routes and layouts, designed for Server Components

#73

Next.js is very nice. One thing that always strikes a nerve with me though is that it goes against 12 factor. There is no proper way to build once, deploy (with config) multiple times. So either you have to build for each environment, which on kubernetes means building different container images (one for each environment). Or do a full re-build when the container starts, which means slower container startup, but at l…

Nearly all front end metaframeworks/starters are like this, which is why I've given up on trying to run them in Docker, because it's just over-complicating the deploy process with no real benefit due to what you mentioned, and I'd rather just use simpler tools like Netlify.

Re: Next.js Layouts RFC: Nested routes and layouts, designed for Server Components

#74

Could a smart person please compare and contrast this RFC and the ideas of remix.run?

The routing is pretty similar. A concept that predates Remix, but Remix made popular again.

What sets Remix apart is how it handles network requests through its own wrapper, which anecdotally leads to incredibly simple data handling. Even cooler, if you restrict yourself to GET and POST, your app will work without JS. Nifty, if you ask me.

Re: Next.js Layouts RFC: Nested routes and layouts, designed for Server Components

#75

Potentially pretty stupid question, I've never used any React framework like Next.js but I have used React for a while. Are these frameworks always meant to provide the backend as well? I'm using .NET as the backend, so I'm curious if they are something I should look closer at. I mean for SSR they have to run on the backend, but even that I could imagine running parallel to the main backend. I'm just not sure if you…

> Are next.js and other similar React frameworks worth looking at if you don't use node.js on the backend? It depends on why you’re doing so. We’ve recently moved from a C# .net backend to a TypeScript node backend and in such a case it (well obviously) makes perfect sense to utilise next.js. In other cases where you split your front end and backend quite clearly, like using .net APIs and a JS front end it can make s…

I've heard people suggest to always use Next.js, because the alternative (Creat-React-App) is being developed too slowly.

Re: Next.js Layouts RFC: Nested routes and layouts, designed for Server Components

#78
post #66

I like the way this works, it feels inspired by SvelteKit's __layout.svelte files and I think it's just very intuitive to work with. Edit: welp, seems i glanced over too quickly, it's literally written there: > The layout.js file convention was inspired by the work done in SvelteKit

why do I remember that nextjs always has had layout. Only worked with it briefly 2 years ago.

Re: Next.js Layouts RFC: Nested routes and layouts, designed for Server Components

#79
post #76

Every time I hear any news about routing in a React framework I always get disappointed that the news isn't that they're introducing type-safe (TypeScript) routes to enable type-safe linking.

I'm curious about what you mean. There's no way to embed type information into a URL - every GET parameter is a string. Are you suggesting that visiting a link like /123 would go to the 'string: "123"' route, while clicking a would route you to 'number: "123"'? That would make deep linking in an app really hard to manage. I'm struggling to understand why you'd want to overload routes like that.

Re: Next.js Layouts RFC: Nested routes and layouts, designed for Server Components

#80
post #41

Earlier quoted context omitted.

It's a full fledged company and somehow Ryan Florence and the other guy are quite heavy handed in pushing their business which irks me. Even react router was moved to a business org called react training if I remember so that they could sell their courses. Now there is nothing wrong with earning money but this new wave of "open source" businesses is a bit yucky.

theres a lot of cognitive dissonance in monetization of open source by consumers of the product. If you can't charge money for the software, selling courses is the next best thing. Why is it yucky?

You can make convoluted software which creates an artificial need for your training or consulting service.

Also using OSS as a funnel for your business and then use your training to hype up your OSS projects

Post reply on HN