Live data from Hacker News

Next.js 12

nextjs.org

111–120 of 293 posts

Re: Next.js 12

#111
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. No, when self-hosted, server files will just run on your server :)

2. You can use the `keys` prop to prevent that (this is still very experimental and the API is not finalized).

3. We will be sharing more on this soon, but yeah still early days.

Re: Next.js 12

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

What's the timeline on React Server components? It seems next 12 experimental feature of Server component is a very early look? Since React 18 is not out yet, and it's not planned to have Server component in that release.

It's available to try today under an experimental flag. React 18 is still in alpha. We'd love to hear your feedback!

Re: Next.js 12

#113
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 do you achieve no cold boots on edge functions? Is it the same approach as Cloudflare ( https://blog.cloudflare.com/eliminating-cold-starts-with-clo... ) or something else? Are there any tradeoffs to be aware of with your approach vs theirs if they're different?

Vercel's Edge Functions are built on top of Cloudflare Workers. The runtime is designed for any similar provider, but we've chosen Cloudflare for now because they have an amazing product.

Re: Next.js 12

#114

Earlier quoted context omitted.

Vercel / Next.js does function as a backend, too. You simply add an api folder and create 'routeName.js' files in there and you've got an endpoint backed by a lambda. And Vercel itself allows you to install backend services such as Redis caching, databases, or queues that you can pull in from those functions.

but (at least last I checked and from what I can glean from current docs) Vercel doesn't host databases, or integrate on a network level with the major cloud providers that do, so if you run your "back end" on Vercel you still need a "back back end" from a different provider and are opting into a huge amount of network operations burden to securely connect the two.

Check out supabase

https://supabase.io/

Re: Next.js 12

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

I'm personally curious how the Next is able to achieve the claim of "zero client-side JavaScript" mentioned here[1] using react server components? It just doesn't seem to make sense to me, and the HN clone example and my barebones test project also clearly still load about 74.2 KB of JavaScript. Is the claim supposed to mean that the server components won't require additional JS, or maybe that they won't need to execute any client-side JS to be fully rendered?

[1]: https://nextjs.org/docs/advanced-features/react-18#react-ser...

Re: Next.js 12

#116
post #81
post #16

Earlier quoted context omitted.

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

The Rust compiler is just swc which has been around as another project for ages. Checkout it’s home page. Many people are using it.

Yeah, Deno is using it as well!

Re: Next.js 12

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

esbuild is a bundler like webpack, it also does Typescript transform but the API is limited, e.g. you can't access the ast. Meanwhile swc is a Rust alternative to Babel.

Re: Next.js 12

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

I'm personally curious how the Next is able to achieve the claim of "zero client-side JavaScript" mentioned here[1] using react server components? It just doesn't seem to make sense to me, and the HN clone example and my barebones test project also clearly still load about 74.2 KB of JavaScript. Is the claim supposed to mean that the server components won't require additional JS, or maybe that they won't need to exec…

Seems he missed your question, which I’m also curious about.

Re: Next.js 12

#119
post #48

If Next.js + Vercel is the leader of the production-ready frontend-as-a-service space, why hasn't a similar leader emerged in the backend-as-a-service space? I would love a clean Vercel-like abstraction on top of standard cloud primitives (functions, queues, events, workflows, etc.) with everything wired up nicely and focused on developer experience. It just seems like AWS is so configuration heavy that it is ripe fo…

https://supabase.io has:

- Postgres DB (+ admin panel + realtime sync + search + workflows)

- Auth

- Storage

- Functions (beta)

(disclosure: am small angel investor)

its interesting that you consider workflows a "standard cloud primitive". what do you currently use? (i work on a workflow engine myself)

Re: Next.js 12

#120
post #82
post #64

Earlier quoted context omitted.

Maybe something like https://encore.dev ? Looks like a similar mindset.

This certainly is akin to what I had in mind, and looks really great. A couple of thoughts: 1) Ideally the framework is polyglot (Go seems sensible though) 2) I wish they had queues/events that were wired up to functions 3) Not sure if using autoscaling k8s services under the hood as opposed to serverless functions is the right choice 4) A bit too opinionated on DB/Auth (maybe I don't want to use Postgres) 5) With al…

> 4) A bit too opinionated on DB/Auth (maybe I don't want to use Postgres)

This feels like a weird criticism considering Next is React only.

Post reply on HN