Brilliant presentation of data flow in svelte. I have trouble with your videos because you move so fast, lol! I have to run them at .75X speed, but I will use this as a reference if I have to review this in the future. Thank you for doing this and providing the code so we can play with it ourselves.
@@JoyofCodeDev Don't worry about the length. Whatever length is necessary to explain what you have to explain is just fine with me. Slow down, take your time. 😊
and i have a question. at start we see flow looks like hooks => layout.server => layout => page.ts but on chapter data passed through routes we see hooks => layout.server => page.server => page => layout.ts so layout universal load file goes last before svelte files. why ordered changed?
This is my favorite video so far for sure. I tested this myself to learn, because understanding this is essential imo to develop properly. Helped me clear up a lot of doubts I still had. Thank you!
Amazing content. I was working with Svelte and now it's like a new a refresh. I finally understand how data works and pass throw the layers. Love Svelte even more. You can construct applications really fast. Simple ones.
I’m honestly really grateful to you for all the effort you put in your content. It’s amazing how you find ways to put complicated things in very simple terms and illustrate them in a very friendly way :) Just don’t rush so much! xD
I am still finding it hard to understand role of +[file].server.ts and +[file].ts (where file -> page / layout). +[file].server.ts => executes codes on server side which means if I have any logic that I want to server-side render, I'll pick this file. This much is clear to me. +[file].ts => executes code on both server and client. I don't understand purpose of this file. If I want certain piece of logic to execute on server, I will use +[file].server.ts & if I want that logic to execute on client side, I could use any of svelte life-cycle hook. This would save me from repeatedly checking if (browser) { .. } Can anyone help me clear this thought process.
It helps if you think more about where you want to run the load function. You might only be able to get some data from the server (using a secret) but you might want to do something else in the browser in which case you can pass the data from `+page|layout.server.ts` to `+page|layout.ts`. I have a lot of examples in my page versus standalone endpoints video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-8OmsVZuuQMc.html.
@@JoyofCodeDev Just so there is no misunderstanding, on their website it is Other topics > Componentization >Forms and fields in components. Thank you, i love your videos.
At 1:11 you talk about getting user preferences from 'local storage'. Is this 'local storage', the sveltekit 'local storage', or is this the Web Sorage API( window.localStorage ) which provides access to a Storage object.
Hey @JoyofCode! I have a new project in Svelte that is still in V1.0 and new, not so big. Do you think is a good practice to use TS in the project? I am not using at this moment. But as the project get bigger, I can see now, maybe is a good one to change it to TS use.