Hacker News new | ask | show | jobs
by danbulant 1343 days ago
This seems to work the same svelte kit does? Except it's react and not svelte.
1 comments

It does not, Qwik’s claim to fame is that it doesn’t need to hydrate the page with JavaScript, it does this not only by serialising data sent from the server but also by doing it with the “component code”. The explanation is a bit simplified but hopefully it makes sense.
I can't get it from that explaination.

Does it work like elder.js?

The key difference is that Svelte, like React/Vue and most other frameworks is not resumable. Resumability essentially means that the client is able to take server-rendered markup and state and resume execution – this greatly reduces the overhead associated with hydration (it's kind of like a very, very efficient hydration)

The only resumable frameworks currently are Qwik and Marko6 (not released yet, beta coming Q1 2023)

Elder.js does partial hydration, which is similar to what Marko5, Astro or Fresh do. It basically means the server marks certain components (or component trees) as static, and tells the client to not hydrate them at all.

This works in reducing the amount of work the hydration has to do, and therefore making it quicker, but it doesn't do much for web applications with lots of interactivity.

What I do not understand is why is hydration claimed to be such a concern if it only happens on initial page load and then the client-side takes over?

In Amazon famous case, the 100ms delay was because it was an MPA: each page change was a page load. In that case I'd understand.

I don't disagree, plus the Amazon metric has been quoted everywhere with very little context, so I wouldn't be surprised if it was not fully accurate.

However, there are teams that have a lot of insight into the needs of ecommerce that are investing heavily in reducing the hydration overhead – I imagine the reason for it is that in very dynamic sites it feels clunky that the user can't interact with the page until it has hydrated.

It is no coincidence that the only other framework besides Qwik that is being built around resumability is eBay's Marko 6

Isn't eBay another MPA?

They have probably influenced each other but I still feel like the claims about hydration might be kind of a red-herring.