Learn How SvelteKit Works

  Рет қаралды 17,005

Joy of Code

Joy of Code

Күн бұрын

Пікірлер: 79
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
SvelteKit had some routing changes but it works the same.
@luna_skye_22
@luna_skye_22 2 жыл бұрын
Criminally underrated content, this is beautifully done and just what I needed!
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
I'm glad you enjoy it! 😄
@webmaster246
@webmaster246 Жыл бұрын
It's always like that, cause developers are people and most of people are raiders in terms of source consumption : the will use it and will say no thanks, not mentioning 1 dollar donations . I personally try to say thanks, if I have a spared dollar I will donate it. When it comes about documenting your own stuff, I always give a credits to developers, teachers, when citing their work or knowledge not only for being academic, but showing appreciation in any possible way . Agree with @Sepshun . All playlist about Svelte is a hidden gem, appreciated sharing your knowledge with us @Joy of Code ♥
@simonnice9030
@simonnice9030 2 жыл бұрын
I work with Svelte and Sveltekit daily and I can say that this is one of the best videos of the subject. A must see for Svelte developers.
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
Thank you! 😄
@christinefredricksen8743
@christinefredricksen8743 2 жыл бұрын
That was great, just what I was looking for. I have a better understanding of SvelteKit and a better understanding of web development in general. Many thanks!
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
I'm so glad to hear that! 😄
@lihautan
@lihautan 2 жыл бұрын
this is very detailed walkthrough! oh man..how i wish i've created content like this....
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
Thank you! 🙏
@webmaster246
@webmaster246 Жыл бұрын
@lihautan never too late, but being honest some are better engineers, other are better teachers . I'd say stick to be a good co-engineer of Svelte, Li !
@Shaparder
@Shaparder Жыл бұрын
That was really what I needed to understand everything abouts SvelteKit, it should be featured on the official Svelte documentation !!
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
I'm glad you liked it! 😄
@_the_one_1
@_the_one_1 2 жыл бұрын
Your content is amazing man! Keep it up!
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
Thank you! 😄
@bobbradleybell
@bobbradleybell 2 жыл бұрын
So beautiful content, so well explained. Big thanks for making the svelte community grow.
@bobbradleybell
@bobbradleybell 2 жыл бұрын
Btw, i saw you making a lot of svelte-sveltekit videos lately, What are your thoughts about the future of svelte?, Enough to beat react?, better than vue?. I'm a UI Engineer focused on Data Viz, for me svelte is the clear winner since i need to make really performant apps, so choosing a compiler like svelte is clearly the best option (in my case).
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
I know a lot of people would love to see Svelte at the top but I doubt it's going to reach React but it doesn't have to because Svelte isn't focused on that. I love Svelte because I think it has the best developer experience and I trust the vision Rich Harris has for it since he's wicked smart. These base frameworks aren't important as their meta-frameworks because Next.js is more popular than React and I'm also excited about web frameworks like Remix and SvelteKit. I'm glad you enjoy it!
@Ryan-ms8bi
@Ryan-ms8bi Жыл бұрын
In the Self Setup part, you can set up +page. svelte instead of setting up the index. svelte.
@andantebass6113
@andantebass6113 2 жыл бұрын
This is beautiful! I was just wanting to learn more about Sveltekit. You got another sub from me!
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
Thank you! 😄
@wearesherlocked
@wearesherlocked 2 жыл бұрын
I don't usually leave comment but thanks for all of your Svelte coverage, kisses!
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
As someone who does the same I appreciate you.
@AlexanderSuraphel
@AlexanderSuraphel 2 жыл бұрын
Great video as usual 🚀! What is special about your videos is the companion blog posts you make that we can read for reference. If I can ask one unrelated question... Is it possible to create robust APIs with SvelteKit endpoints? What important capability would one forgo instead of using Express or Koa for instance?
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
A huge benefit is that your forms have endpoints which is awesome for progressive enhancement - It's great for most situations where you would use a REST API but not if you want to build something real-time using WebSockets because it's not easily supported.
@AlexanderSuraphel
@AlexanderSuraphel 2 жыл бұрын
@@JoyofCodeDev BTW I looked at the concept of adapters and that all you need to get best of both world. I'm creating adapter for fastify so my sveltekit APIs will have the functionality of fastify. Same type of adapter exists for Express!
@karolus__
@karolus__ 2 жыл бұрын
Maaan, I was waiting for something new from your side, here we go, 1 hour of great content!
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
I hope it's worth it 😄
@FREESTEP_DANCE
@FREESTEP_DANCE 2 жыл бұрын
@@JoyofCodeDev Definietely! It was awesome. I also would love to see more in depth view on topics like: error handling (how to pass data to page on redirects, displaying toasts messages if something went well or wrong, etc.) and list/table filtering (text base search, sorting, etc.) Thanks & keep up the good work!
@BrentMalice
@BrentMalice 6 ай бұрын
ur the real hero of kvatch
@SaidElnaffar
@SaidElnaffar 9 ай бұрын
Another masterpiece from Joy of Code -- Guys, don't forget to visit his blogs in the description above.
@sharia.design
@sharia.design 2 жыл бұрын
Nicely done! Congratulations! 🤩🤩🤩 I wish to know your approach for localizations in SveleteKit :)
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
It's something I want to explore!
@Adi-fw6ou
@Adi-fw6ou 2 жыл бұрын
helo i have question i am learning javascript what should i learn next? TS or any framework? and if framework then which one? Svelte? btw react is also very famous around but what should i go for? 1 morw question MERN = full stack then is Svelte + Svelte kit = full stack? sorry if i said smth weird bbut i very wrong in english. thank you
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
1. Don't "learn" TypeScript but start using it and use my TypeScript videos as reference 2. I would recommend you pick up SvelteKit unless you have a specific reason to learn another framework 3. SvelteKit is a full stack framework because you have your frontend and backend code in one place 4. If you understand what problems frameworks solve you're going to have an easier time learning any framework
@SRG-Learn-Code
@SRG-Learn-Code 2 жыл бұрын
What a great video idea to explore and expand on a blog post. The post it's awesome (although you've lost me many times, not your fault, I'm noobing around) and it's likenot many people takes time to comprehend the "magic" of svelte.
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
Let me know what confuses you!
@SRG-Learn-Code
@SRG-Learn-Code 2 жыл бұрын
@@JoyofCodeDev Puff, where to start? Everything you explain is correct and interesting, but it's too much to grasp. I use mainly static-adapter, which I guess is SSR were the endpoints are processed during build and then disappears? Sometimes I don't follow when some things happens in the 'server" (with static adapter I guess the server is the machine during build) and when they are visible or accesible in the client. For example, I built a demo using an endpoint that fetched a graphql database, and during build, it took everything I needed from that database, created a json file with that data, rendered all the pages with that data and... the json file remain there, also the query was still in client code. Are shadow endpoints made for that? How do you hide "backend" code to the final user? Those things I still don't understand, I'm trying to get into the adapters but they are bigger than me, like, how would you host firebase but have logic with deno-deploy or vice versa? Too abstract to grasp for me now, thankfully videos like yours helps a lot to learn a bit every day.
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
​@@SRG-Learn-Code Thank you for your response! 1. SSR (server-side rendering) builds a page on demand and SSG (static site generation) builds the pages in advance so the main difference is when the work is done and knowing when to use each. 2. You're always using the server if you're using SSR because you need to return the component as HTML and talk to the database from an endpoint. 3. Page endpoints are a way to get data for your page and pass it as props before it's initialized because pages are components. 4. Your backend code isn't visible on the client which makes using secrets secure and you can confirm it if you fetch some data for the page and if you look at the network tab you won't see a fetch request.
@alexvass
@alexvass Жыл бұрын
So, the 'adapters' are there to adapt the svelte-kit to the underlying supporting server (backend) technology? eg. nodejs is supporting the sveltekit app and you need an adapter for nodejs to make this happen?
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
Yeah, exactly! There are more JavaScript runtimes and a SvelteKit app is a machine for turning a `Request` into a `Response`.
@GIOVANNYGARCIAHOLGUIN
@GIOVANNYGARCIAHOLGUIN 2 жыл бұрын
really beautiful channel
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
Thank you! 😊
@HugoDuprez449
@HugoDuprez449 2 жыл бұрын
Amazing content ! I’m currently learning express and I see what executing code on a server mean (at least, I think). If I want to deploy my express app, rent a cloud machine. But what does « this is executed on the server » mean in this server side rendering part of the video. Does it mean the Vercel server where my website files are hosted run the function before sending a response ? If it’s the case, why service providers like Vercel don’t charge for this load? Since it seem to be the same as renting a cloud machine to run code on a server ? Thanks a lot for your work !😊
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
Take the newsletter example where you have to run a Node.js server constantly because you don't know when someone is going to subscribe - serverless functions only run when you need to meaning it's cheap and Vercel has a generous free tier but there's a limit if you look at vercel.com/pricing.
@phoneywheeze
@phoneywheeze 2 жыл бұрын
what if I'm using a npm package that I'm only going to use on the backend(endpoints) but it's not necessary for the client. Do I need to add it as dev dependency? if not, how does sveltekit figure to include the package in client or server or both
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
That's a good question! You don't have to think about it because it knows what should run on the server based on the imports I would assume. You should declare what needs to be a dependency as such so hosts like Vercel know what packages to install.
@aestheticallyamazing2003
@aestheticallyamazing2003 2 жыл бұрын
Can I ask what mic are you using for the videos, they look so crisp
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
I use genesis-zone.com/product/radium-400 that's a cheap USB microphone but it sounds great because I process the audio after which I want to make a video on in the future.
@DanielRios549
@DanielRios549 2 жыл бұрын
43:00 OMG, I was getting an error with fetch inside load function and I didn't figure out how to fix, I simply miss the fetch param, I did not know about SvelteKit provided fetch...
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
You can learn more about it in the docs kit.svelte.dev/docs/load#input-methods-fetch.
@ianengelbrecht4773
@ianengelbrecht4773 2 жыл бұрын
Great video, helped me understand a lot more
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
I'm glad to hear that! 😄
@reimdl
@reimdl Жыл бұрын
Hi, which theme are you using with Brave?
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
I used chrometheme.studio/ to create a custom theme if you want to make your own.
@reimdl
@reimdl Жыл бұрын
@@JoyofCodeDev thank you, I will try it
@MsShadX
@MsShadX 2 жыл бұрын
New to svelte, i should rewatch this a couple times, i just wanna ask i already built a fastapi backend and i wanna learn something new to consume it as a desktop app, i used vuejs/electron in the past, is svelte/electron a good option? And i still don't understand if sveltekit is suitable for my purpose or not.
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
You would use Svelte with Electron because SvelteKit is an entire thing and I would look into tauri.app/! 😄
@MsShadX
@MsShadX 2 жыл бұрын
@@JoyofCodeDev thanks. I heard about tauri very briefly, i'll look into it
@avi12
@avi12 Жыл бұрын
Can you make an explainer for the Qwik framework?
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
Would you be interested in a series where I explore other frameworks?
@forno_nicolas
@forno_nicolas 6 ай бұрын
@@JoyofCodeDev No actually is great have some deeply specialized content
@EfosaMichael
@EfosaMichael 2 жыл бұрын
You know the drill... like, then watch... you're welcome!
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
Thank you! 😄
@MIMRamees
@MIMRamees Жыл бұрын
but having backend seperated is good right?
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
Depends what you're doing! 😄
@lucklessman3472
@lucklessman3472 2 жыл бұрын
its off topic question but music u mentioned in ur comment section is paid? isnt that free? or u always pay for diff diff music in ur videos
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
I wanted people to support the artist but it doesn't seem to exist anymore.
@mirzapubg5417
@mirzapubg5417 2 жыл бұрын
Remix > 😎
@JoyofCodeDev
@JoyofCodeDev 2 жыл бұрын
You know I love Remix! 💿
@AlexanderSuraphel
@AlexanderSuraphel 2 жыл бұрын
Remix is greater than what? :)
@DanielRios549
@DanielRios549 2 жыл бұрын
48:23 This is one of the biggest problems of SvelteKit til now, it does not have partial hydration, it gets the HTML from the server and runs everything again in the client, this is too much work, even on production, if you use adapter-static, with all the data in a loop already in the response served from a CDN, SvelteKit will delete that content and run the loop again on the client. I'm holping partial hydration will be added after 1.0
Using Environment Variables With SvelteKit
6:29
Joy of Code
Рет қаралды 7 М.
Svelte Summit Spring 2023
4:02:51
Svelte Society
Рет қаралды 11 М.
Brawl Stars Edit😈📕
00:15
Kan Andrey
Рет қаралды 46 МЛН
PromeAI: Step by Step Guide to Creating Stunning Consistent Images
10:47
Understand How Data Flows Through SvelteKit
25:59
Joy of Code
Рет қаралды 19 М.
Understanding Effects In Svelte And When To Use Them
27:31
Joy of Code
Рет қаралды 6 М.
The Comprehensive Introduction To SvelteKit
21:38
Joy of Code
Рет қаралды 34 М.
Make Your Own Svelte Component Library
35:16
Joy of Code
Рет қаралды 19 М.
Everything You Should Know About Working With Forms In SvelteKit
1:02:56
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Dylan Beattie
Рет қаралды 158 М.
Web Server Concepts and Examples
19:40
WebConcepts
Рет қаралды 246 М.