DioxusLabs / docsite

Dioxuslabs.com documentation site
https://dioxuslabs.com
109 stars 94 forks source link

Document hydration and hydration issues for dioxus fullstack #242

Open ealmloff opened 3 months ago

ealmloff commented 3 months ago

We briefly mention hydration in the choosing a web renderer chapter, but we don't explain it in the fullstack guide. We should explain both hydration and how to recognize and avoid hydration errors (nondeterminism).

frantisek-heca commented 3 months ago

In the meantime - can you tell me please, what strategy/implementation model is Dioxus inspired by? Or heavily based on? Just to give me better mental model to some already existing, described system. For example, is it something like Qwik handlers? Or more like Next.js (expensive) hydration, or React server components.... ?

ealmloff commented 3 months ago

In the meantime - can you tell me please, what strategy/implementation model is Dioxus inspired by? Or heavily based on? Just to give me better mental model to some already existing, described system. For example, is it something like Qwik handlers? Or more like Next.js (expensive) hydration, or React server components.... ?

It is similar to (how I understand) hydration in Next.js works. Every component is run on both the server and the client unlike Qwik and server components. Hydration should be faster than Next.js because we use the structure of templates to only hydrate dynamic elements in your site. In the Javascript world, I think millionjs does something similar to speed up hydration