Live data from Hacker News

Next.js 12

nextjs.org

11–20 of 293 posts

Re: Next.js 12

#11
post #2

Hey everyone, Lee from Vercel here! Happy to answer any questions about Next.js 12. Personally, I'm extremely excited for the new Rust compiler.

How about on demand page revalidation* ? I can't find if it's part of Next 12.

* https://github.com/vercel/next.js/discussions/11552#discussi...

Re: Next.js 12

#12

Seems like a ton of tools/dependancies/frameworks to do something relatively simple. What is the benefit of this over using Hugo with Go templates?

I'm not sure how extensible Hugo is, but Next allows full server side code. From my understanding (which may very well be wrong), Hugo is for static site generation.

Re: Next.js 12

#13
post #2

Hey everyone, Lee from Vercel here! Happy to answer any questions about Next.js 12. Personally, I'm extremely excited for the new Rust compiler.

Is Next.js Live only available if the project is hosted on Vercel?

No, it works fine with any static hosting system, like S3+CDN, Netlify or others. The API feature (FaaS) needs special server handling to run, but they're just Node functions, so other systems also add support.

Vercel just has first class support where everything just works, but can you host it yourself.

Re: Next.js 12

#14

Seems like a ton of tools/dependancies/frameworks to do something relatively simple. What is the benefit of this over using Hugo with Go templates?

The main benefit of NextJS is that it makes it very easy to write code once and quickly swap whether it's going to be statically generated ahead of time, rendered on the server, or rendered dynamically on the client. It also comes with a bunch of features you'll likely need for a modern web page like image optimization and a really nice PaaS to deploy it to.

Re: Next.js 12

#15
post #10

The big innovation here seems to be https://swc.rs/ If it works as advertised this is going to be great for a ton of JS/TS projects. Particularly having a 20x typescript compiler boost when running large test suites would be great. Maintaining 5-8 different babel related projects in packages.json is also annoying and often buggy. Looking forward to see where else this gets adopted and it's stability.

How does it compare to esbuild? Seems they both want to achieve exactly the same thing, but somehow it's two different efforts.

Re: Next.js 12

#16
post #2

Hey everyone, Lee from Vercel here! Happy to answer any questions about Next.js 12. Personally, I'm extremely excited for the new Rust compiler.

Also excited about the Rust compiler! Apologies if this is far from reality, but by looking at recent commits in GH[1] it looks as though this has been rushed for a v12 release, so I was wondering how much of internal testing has this been going through before pushing it to the broader public.

[1] https://github.com/vercel/next.js/commits/canary

Re: Next.js 12

#17

Nice, a completely new attack-vector: https://nextjs.org/blog/next-12#url-imports Documentation still not there, so can't check if they actually compare any checksums or anything. They also introduce their own `next.lock` which supposedly new tooling have to built around as well. Versioning management? What, we don't need that for where we're going. Finally it's fun to see it ending with: > We set out to build a zero…

> I guess replacing configuration with code is one way of achieving "zero-configuration".

That's a weird thing to have beef with since this approach to middleware is completely inline with Next's zero-config philosophy.

They take common patterns in the industry and make them dead simple to use out-of-the-box.

In an alternate framework that uses middleware, you would have to manually configure the middleware on whatever server you are using and then attach all the middleware in a single place.

Their approach IS zero-config. You just add a file with your middleware function in the corresponding directory and you're done.

Re: Next.js 12

#18
I don't get it. It's still not possible to use next/image (without some fancy loader or 3rd party service) when exporting a SSG build.

Are people really not using responsive images when exporting a static site? Seems quite ridiculous to rely on some 3rd party service for image optimization when the images could be generated locally when exporting the site...

Re: Next.js 12

#19
post #2

Hey everyone, Lee from Vercel here! Happy to answer any questions about Next.js 12. Personally, I'm extremely excited for the new Rust compiler.

Hey Lee. I am not entirely sure how server-side components replace the dynamic/static balance next.js is now the market standard for.

1) Do the .server files require any special infrastructure for self hosted solutions?

2) If we move to ISR to a component level, would that mean that a page with multiple components will generate a backend-process thrash of multiple refreshes? (say 10 components, each with a revalidate 1 s)

3) Is there a good mapping to translate ISR to server side components from both UX and infrastructure/implementation?

Re: Next.js 12

#20
post #2

Hey everyone, Lee from Vercel here! Happy to answer any questions about Next.js 12. Personally, I'm extremely excited for the new Rust compiler.

Can we still use obscure babel macros with the new Rust compiler? And if so, what do you think the future will look like for babel macros in a future where most build tooling is written in languages like rust/go?

> in a future where most build tooling is written in languages like rust/go

You really think most of the build tooling will be written in other languages than JS? Compilers make sense, they are very CPU bound, but otherwise build tooling should also be accessible to modify to the developers working in the project, not just those who use Rust/Golang. And I'm sure we'll still use JS projects for some of the tooling.

Post reply on HN