Live data from Hacker News

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

nextjs.org

61–70 of 123 posts

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

#61
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 get much benefits out of these frameworks without the tight integration on the backend.

Are next.js and other similar React frameworks worth looking at if you don't use node.js on the backend?

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

#62
post #14

Earlier quoted context omitted.

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

Which is a bit silly, to be honest. I understand wanting to see some credit given, and it wouldn't have cost Vercel anything to do so, but this is hardly "new Remix technology" that they're copying (also the condescending "React czar" stuff is just super inappropriate, but par for the course with the way the Remix team has been talking about Remix on Twitter since the days when they were boasting about not taking VC…

I don’t understand why you’d ever expect your competitors not to copy your good ideas. That’s business sense 101 as far as I’m concerned.

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

#63

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…

No, there are many frontend only frameworks.

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

#64

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…

You need some form of backend if you want Server Side Rendering, and SSR is why most people opt-in to a React framework.

And then you already have a backend so it's an easy jump to just using Nodejs on your backend as well.

But a lot of people also just use NextJS as is and never build any server side code and just run their own API beside it.

Or use other frameworks that don't include any SSR features, such as Create-React-App

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

#65

Sell me next.js in a tweet sized paragraph. Why should I use next.js?

Quickly develop websites in React. Build statically generated pages or dynamically generated server-rendered pages, and deploy them almost anywhere.

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

#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

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

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

Credit's been added: https://twitter.com/leeerob/status/1528887380681588736

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

#68

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 sense to use some degree of nextjs if you need to integrate some compiled parts into your react, maybe you need a fast loading and/or front page then it can be valuable to mix it.

If you don’t know why you’d need it, you probably don’t, however.

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

#69
Frameworks like nextjs are in an eternal existential battle to stay relevant. In my 4 years of using Next, I experienced a large number (6 or 7 releases) of major version releases.

What the industry needs is not more breaking changes, but solidified frameworks that companies can rely on. Every major release adds another wave of technical debt as things become deprecated.

I appreciate updates, but to me this particular proposal shows a lack of long term vision for the framework, attempting to throw in all the exciting bells and whistles from competing frameworks.

This philosophy of “lets stay relevant” will ultimately cost businesses.

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

#70
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 least you can re-use the container across environments and properly inline environment variables. There's a discussion about this; https://github.com/vercel/next.js/discussions/24010
Post reply on HN