Live data from Hacker News

Next.js 10

nextjs.org

171–180 of 206 posts

Re: Next.js 10

#171
post #89
post #78

Earlier quoted context omitted.

I think he means if you want to offer React server side you will need some-sort of web framework to serve it. Usually that's Express or Fastify or something like that.

Next.js does server-rendering and has API routes built-in. No need for Express or Fastify unless you like the DX of those frameworks better.

The Parent parent was talking about if you don’t use Next and want a more sophisticated setup then then those are alternatives.

The parent then asked why do you need to integrate [react] with Express and my answer was if you want to do server side (not using Next)

Re: Next.js 10

#172
post #10

The big elephant in the room most of these frameworks are missing is partial hydration. Instead of hydrating the whole page, only the interactive parts are hydrated, sending the absolutely minimal JS needed to the client. AFAIK only Marko has this feature today. Since it's developed and used at Ebay they focused on the best SSR+hydration experience from the start. Imba v2 will also have patial hydration (confirmed by…

Is Marko the ONLY framework with this feature? Surely there's some more.

I've been looking at this for months and AFAIK it's the only one that has it OOTB. If you find others, please let me know.

It can be implemented with React and others (I've done it with Svelte) but it's complicated. See this example on how to do it with Preact and Next:

https://medium.com/@luke_schmuke/how-we-achieved-the-best-we...

Re: Next.js 10

#173
post #10

The big elephant in the room most of these frameworks are missing is partial hydration. Instead of hydrating the whole page, only the interactive parts are hydrated, sending the absolutely minimal JS needed to the client. AFAIK only Marko has this feature today. Since it's developed and used at Ebay they focused on the best SSR+hydration experience from the start. Imba v2 will also have patial hydration (confirmed by…

Alpine.js has partial hydration. ;-)

It works on any string of HTML but it doesn't have SSR so I don't think it counts as hydration.

Also, the unsafe-eval CSP is way too risky.

Re: Next.js 10

#174

Nextjs has the dejavu vibe of docker. It is a brilliant framework dragged slowly and inexorably into "platform lock-in". Nextjs has defocused on SSR (which was the original selling point of a server side Reactjs). And all the other cool features only run on Vercel. It is getting next to impossible to deploy Nextjs (with all its features) on GAE for example...or heroku. There are other alternatives to Nextjs that are…

Vercel is great at getting out of the way of deployments and just working. But I've deployed Next apps to Linux servers on AWS, GC, DO and it wasn't much more involved that a standard Node deployment - Next with Elastic Beanstalk is pretty straight forward too.

Re: Next.js 10

#175
post #144

Earlier quoted context omitted.

Well, this sounds a bit typical JS dev talk. React isn't all that terrible, it's actually quite good and battle-proven. It has great libraries, many devs are familiar with it and if you know it well you can be pretty damn productive with it. Not to say Svelte doesn't have great innovative features, but I myself don't still feel that tempted to jump into Svelte. What some of us don't like, is the infamous JS churn whe…

React is extremely bloated. I don’t think it can justify its weight on content pages. If all you need are some show hide buttons and a CSS animation, it’s way too heavy. That’s a pretty good reason to look at other tools.

If all you need are some show hide buttons and a CSS animation, do the whole thing in four or five lines of vanilla JS in an inline script tag. You're right that React is the wrong tool for the job, but so is Svelte and so is everything else discussed in this thread.

Re: Next.js 10

#176
post #18

Earlier quoted context omitted.

They don't have enough funding. Next.js and Gatsby are in an entirely different weight class compared to Sapper. https://sapper.svelte.dev/

And... Sapper is dead btw. Rich said it recently in a video. The Svelte team is working on the next big thing combining Svelte with Snowpack. The project is called SvelteKit. https://www.youtube.com/watch?v=qSfdtmcZ4d0

"Sapper is dead" is not really accurate. SvelteKit is Sapper + Snowpack and there will be a migration path.

Re: Next.js 10

#177
post #48
post #18

Earlier quoted context omitted.

And... Sapper is dead btw. Rich said it recently in a video. The Svelte team is working on the next big thing combining Svelte with Snowpack. The project is called SvelteKit. https://www.youtube.com/watch?v=qSfdtmcZ4d0

Maybe this can save someone some confusion: When I searched the first result for SvelteKit seems to be another project that is dead.

The project hasn't really been publicly released yet. The repository is still private. The package is up on npm, but isn't ready for widespread adoption yet. I'd recommend sticking with Sapper for now.

https://www.npmjs.com/package/@sveltejs/kit

Re: Next.js 10

#178

As someone who only really built websites using jQuery / custom vanilla js and good ole CSS2, this stuff feels completely alien to me

I had also avoided modern web up until very recently. I focused only on Django sites and wrote custom JavaScript as necessary. I even did a 3 month django project with a view that was almost entirely JavaScript—it would have been a perfect candidate for react but I refused. As a compromise with myself I used es6 js on that and eliminated use of jQuery from my code. About a month ago I started work on react. I had ver…

Thanks. I really appreciate the story. I'm a long time Django fan so your story resonates. Maybe I'll give React another try one of these days...

Re: Next.js 10

#180
post #172

Earlier quoted context omitted.

Is Marko the ONLY framework with this feature? Surely there's some more.

I've been looking at this for months and AFAIK it's the only one that has it OOTB. If you find others, please let me know. It can be implemented with React and others (I've done it with Svelte) but it's complicated. See this example on how to do it with Preact and Next: https://medium.com/@luke_schmuke/how-we-achieved-the-best-we...

Elder.js (Svelte framework) has partial hydration OOTB: https://github.com/Elderjs/elderjs
Post reply on HN