We need a clean graphic that visually shows how and when everything is executed in SSR from the server to the client. #4315
Replies: 10 comments 10 replies
-
A sort of graphic could be nice ! (IMHO: it fits my learning style when I approach a new technology). |
Beta Was this translation helpful? Give feedback.
-
I totally agree on this. I have read the docs multiple times, experimenting, building apps and I have to admit that I'm still confused on "exactly what happens, when, why, where". For me a visual map and / or an in-depth youtube-video (not another "hello world") explaining how all these concepts tie together and dispelling common misunderstandings would have been of great value. |
Beta Was this translation helpful? Give feedback.
-
Share info here ↓If you find anything that could help with this, reply to this comment with a list of what you know and/or links to any sources. For example:
Thanks! |
Beta Was this translation helpful? Give feedback.
-
Totally agree. The two biggest confusion points I see are around this and prerendering -- both of which are strongly-related topics. |
Beta Was this translation helpful? Give feedback.
-
I see this is the last moment to add my "Range and Direction of Data Flow in SvelteKit" diagram. I wanted to refine it at some point and describe it heavily, with examples, etc., but now it won't make sense. SVG version(crashes) - link Originally posted by @lukaszpolowczyk in #5748 (comment) |
Beta Was this translation helpful? Give feedback.
-
I couldn't agree more. I'm expecting much more educational material when 1.0 arrives. |
Beta Was this translation helpful? Give feedback.
-
Let's draw it together, we can make something clean later. Here's a collaborative link you can update with your understanding of the data flow in sveltekit: |
Beta Was this translation helpful? Give feedback.
-
I'm also confused (and excited) by all the options Sveltekit gives you. Here I tried to make a diagram of the different pages and options for loading and posting data: https://www.figma.com/file/sQHahYhwrUvTpH92osAxzP/how-to-sveltekit Anyone is welcome to edit. I hope it can help settle on something useful that might end up in the documentation in one form or another. Thanks for pointing me here Enrico/etrain. |
Beta Was this translation helpful? Give feedback.
-
Range and Direction of Data Flow in SvelteKit 1.0: I left out the triggers(those things in green, on previous version graphics). I'll make a separate graphic someday with the triggers themselves - things like error, redirect, invalidate, POST etc. |
Beta Was this translation helpful? Give feedback.
-
This is a great discussion and the diagram is exciting! Please someone put it onto the website. Since SvelteKit pre-defines lots of (route) files, e.g. I personally took some time to figure it out, and realized the design is so brilliant. So, please put a diagram on the doc site to let more people to see the brilliance. |
Beta Was this translation helpful? Give feedback.
-
I've noticed SSR in SvelteKit is a common point of confusion for a lot of people. I think many are missing the point of SSR and how powerful it actually is. It would be awesome to have one place in the docs that explains each part of SvelteKit in relation to SSR, for example:
<script>
<script context='module'>
load()
onMount()
and other lifecycle functionsI have a decent understanding by trial and error, but where can I find the most accurate information on this? I do graphic design for a living and am more than willing to take that info and transform it into something clean, organized, and readable so we can get it into the docs. I was thinking something similar to Vue's lifecycle diagram which I heavily relied on back when I was learning Vue.
If you have any knowledge or resources to share you can reply to the separate comment thread below
Here's my current understanding when using SSR (SvelteKit's default out of the box). This is not in any kind of order, and obviously there's still a lot missing:
hooks.js
<script>
<script context='module'>
load()
onMount()
beforeUpdate()
afterUpdate()
onDestroy()
Progress
I think we should start with what runs on the server and the client when a page is visited on a fresh SvelteKit install (without adapter-static or prerendered pages). We can expand on build time and static/prerendered pages later. Honestly though, with SvelteKit being in prerelease, it might be best to take this slow and wait for things to be more settled.
Resources
If you have anything to add to this list you can reply to the separate comment thread below.
Beta Was this translation helpful? Give feedback.
All reactions