Learn How To Build Modern Web Apps With SvelteKit
SvelteKit is the Swiss army knife of web frameworks for building resilient apps that run anywhere where JavaScript runs.
👉️ Support
▶️ KZread Membership
youtube.com/@joyofcodedev/join
🔴 Patreon
/ joyofcode
👉️ Links:
Learn SvelteKit Playlist:
• Learn SvelteKit
Learn Svelte Playlist:
• Learn Svelte
Posts:
1. joyofcode.xyz/what-is-sveltekit
2. joyofcode.xyz/sveltekit-proje...
3. joyofcode.xyz/sveltekit-routing
4. joyofcode.xyz/sveltekit-loadi...
5. joyofcode.xyz/working-with-fo...
6. joyofcode.xyz/sveltekit-advan...
7. joyofcode.xyz/sveltekit-hooks
8. joyofcode.xyz/sveltekit-deplo...
👉️ Uses:
🔗 joyofcode.xyz/uses
👉️ Socials:
🐦️ / joyofcodedev
💬 / discord
🔖 Timestamps
0:00 Intro
2:15 What Is SvelteKit?
5:00 SvelteKit Blurs The Line Between Frontend And Backend
8:29 Convention Over Configuration
11:17 Best Of Both Worlds: Server-Side Rendering With Client-Side Navigation
16:57 SvelteKit Uses The Web Platform
19:18 SvelteKit Apps Are More Resilient Using Progressive Enhancement
21:02 SvelteKit Runs Where javaScript Runs
22:12 SvelteKit For Component Libraries
22:45 SvelteKit Is Made For Everyone
23:14 SvelteKit Project Setup
24:06 Creating A SvelteKit Project From Scratch
34:12 Using The SvelteKit CLI
45:24 SvelteKit Routing
47:14 Project Setup
48:44 Pages
59:17 Layout
1:03:44 The Power of Nested Routes
1:12:51 Dynamic Routes
1:14:55 Advanced Routing
1:14:58 Multiple Route Parameters
1:16:43 Optional Parameters
1:18:04 Rest Parameters
1:20:18 Matching Parameters
1:23:41 Loading Data
1:23:48 Project Setup
1:24:28 Database Setup
1:38:49 API Endpoints
1:59:28 Showing Page Data Using Client-Side Rendering
2:05:14 Showing Page Data Using Server-Side Rendering
2:13:17 Sometimes You Only Want To Run Code On The Server
2:20:05 Your Layout Files Can Also Load Data
2:29:42 Making Your Data Available Everywhere
2:33:09 Using Data From The URL
2:40:28 Using Parent Layout Data
2:45:09 How Load Functions Work
2:51:19 Working With Forms
2:51:25 Project Setup
2:52:14 Creating A Fake Database
2:55:27 Reintroduction To Forms
2:59:25 Working With Forms Using API Endpoints
3:16:52 Working With Forms The SvelteKit Way Using Form Actions
3:26:31 Progressive Form Enhancement
3:30:44 Customize The Enhance Action To Show A Loading UI
3:37:09 Form Validation In SvelteKit
3:48:27 Advanced Enhance Action Customization
3:53:39 Advanced Layouts
3:53:45 Project Setup
3:54:10 Sometimes You Want Routes With Different Layouts
3:56:18 Using Group Layouts To Group Related Routes
4:03:19 Breaking Out Of Layouts
4:04:28 Layout Reset
4:06:28 SvelteKit Hooks
4:06:34 What Are Hooks?
4:07:44 Creating Routes
4:11:58 Authentication
4:16:39 Transforming HTML
4:19:24 Measuring Page Load Speed
4:21:58 Error Logging
4:23:46 Modifying A Fetch Response
4:25:12 Parsing Form Data
4:28:45 Using Multiple Hooks Together
4:29:53 SvelteKit Deployment
4:30:54 Web Hosting Types
4:36:11 Deploying A SvelteKit Project
4:48:09 Optimizing Your Site
4:59:58 Outro
#joyofcode #svelte #sveltekit
Пікірлер: 174
🔴 Patreon: www.patreon.com/joyofcode 💬 Discord: joyofcode.xyz/invite
Commenting for algorithm, this quality content needs to be seen
Using your sveltekit code snippets/tutorials on your website for reference has been a life saver
For people following the course now, I have to note that pnpx is depreciated, when you encounter it being used in the tutorial you can just replace it with: pnpm dlx
@rumble1925
10 ай бұрын
Ah gotta love the frontend churn
@Aldraz
10 ай бұрын
Honestly it still works well, so why not just use it? I doubt it has a different fuction. Either way, they should just keep pnpx, because pnpm dlx or pnpm exec is dumb and too long.
@7heMech
10 ай бұрын
@@AldrazI didn't have pnpm installed, so I installed it while following the tutorial, and pnpx isn't installed by default with pnpm now. (because it's depreciated) It took me a while to figure it out so I just decided to leave a comment providing a solution which doesn't require you to download more stuff/create aliases.
@Aldraz
10 ай бұрын
@@7heMech Interesting, because I updated pnpm to the last version and it still works. I didn't know it was somehow separated from that package.
This is awesome, you and huntabyte really got the best sveltekit content!
@black-purple
Жыл бұрын
You can even say the only svetekit serious content.
@onz9950
Жыл бұрын
You're missing lihautan's channel and others !
@bilza2023
10 ай бұрын
Is lihautan's amost the maintainers of Svelte ????
OMG I am only 2 hours into this course and I can't believe how good it is. By far the best Svelte course I have seen, can't believe its available for free too. Well done Joy of Code!
@JoyofCodeDev
10 ай бұрын
I'm glad you love it.
Oh sick. Been working with sveltekit a lot recently, excited to give it a watch and pick up anything I have missed :)
Just fantastic work, cheers!
yeah! that's what I was looking for!! thank you sooomuch
Wow! This is insane thank you ❤
in love with your course, thank you a lot
Svaka čast! 👏
Very informative, very thorough, and very well presented, too. Good job, Matija.
Top quality content as always 🚀
Damn dude! Thanks for releasing this for free ❤
I will keep watching your tutorials, I've been here from the start of the channel and will continue to support you. I work as a Software Developer using primarily Vue, though, I wish companies would integrate Sveltekit in the future (would switch jobs immediately)
Thanks so much for this series and everything you do for teaching the community! You are a true svelte ambassador
How awesome is this course 💯
Thank you for the great tutorial! It's so awesome 🎉
@JoyofCodeDev
Жыл бұрын
Glad you enjoy it. 😄
Freakin awesome work, congrats & thanks!!
Dude! Amazing content! Thanks!
Best svelte kit video I've seen so far!
Thanks for the video! Best channel to learn about Sveltekit!
This is a gem, thank you
Awesome content as always !
One of the best tutorials in general not just for sveltekit!
By far the best sveltekit course on youtube 👌❤
Oh my GOD this is what i needed today thanks so much
Joy of course! Thanks a lot for sharing the knowledge
@JoyofCodeDev
Жыл бұрын
You're welcome! 😄
this tutorial is just awsome thanks for that !🤟
Now this is a Tutorial 5 hours of 🎉🎉 Thank you
MY FRIEND this course is just amazing ! Congratulations !
Great work 🎉
nice! Been waiting for this.
Just starting learning Sveltekit and you've made me so much more confident and understanding of how it works. Really love that you show the cumbersome route of solving a problem followed by how svelte kit makes things better. Really highlights how great it makes things for developers! Thanks a million!
@JoyofCodeDev
Жыл бұрын
I'm so glad to hear that! 😄
Thank you very much for a wonderful tutorial.
@JoyofCodeDev
Жыл бұрын
You're welcome! ❤️
Thank you for all your hard work, it is deeply appreciated.
@JoyofCodeDev
Жыл бұрын
Thank you! 🙏
Thanks for kickstarting my career as SvelteKit professional (C)
Awesome, thanks !!
This address every question i'd have on sveltekit and more.Really great content. Thank you so much for that.
Thanks for that! Tons of tips and interesting info
@JoyofCodeDev
Жыл бұрын
You're welcome! 😄
You inspired me to get started playing around with Svelte and i want to thank u a lot your content is soo well explained.
@JoyofCodeDev
Жыл бұрын
I appreciate it! 😄
Fantastic! Great speed and illustration of key concepts right down to deployment. One area that could use more detail, maybe in another video, is the github, supabase, integration. Or is there another good place to see that which shows local development and then production deployment. Thanks again for amazing content!!!
@JoyofCodeDev
Жыл бұрын
You could have a development and production database and use an environment variable to switch between them based on your environment.
Thank you!
Excellent!
Superbbbbb.... big thanks
This is really help me a lot thank you!
@JoyofCodeDev
Жыл бұрын
I'm glad to hear that! 😄
Thanks, thanks, thanks. How I wish the world was full of people like you, how I wish I could spread my little knowledge like that my dear friend. Thank you for your teachings
@JoyofCodeDev
Жыл бұрын
You could write a post! 😄
really like the "optimization" part here
You are literally awesome.
@JoyofCodeDev
Жыл бұрын
Thank you! 😄
مجهود رائع 🎉
Cool desktop setup 🔥
wooo sveltekit!
Thank you very much.
@JoyofCodeDev
Жыл бұрын
You're welcome! 😄
Big efforts ❤
Thanks!
Great course!
@JoyofCodeDev
Жыл бұрын
Thank you! 😄
Thank you Sir
Thank you
Awesome tutorial.
Commenting because this channel should have a million subs. Quality.
@JoyofCodeDev
10 ай бұрын
Thank you! 😄
Thank you very much
@JoyofCodeDev
Жыл бұрын
You're welcome! 🙂
Great video, liked and subbed 👍
Awesome, love this 🎉 I am sending all bananas for you 😄
@JoyofCodeDev
11 ай бұрын
Thank you! 🍌
you are brilliant
I was adamant about svelte and svelte kit cuz it didn't feel like JavaScript......but after coming to the conclusion that it was probably the future,i am ready to learn
Amazing! Can't wait for a spare..... 5 hours to play along! 😂
if you carefully check this tutorial i think you can be master of svelte haha :D thank you man!
Awesome
That tiling window manager looks really good
@JoyofCodeDev
9 ай бұрын
It's Pop Shell.
5:25 CORS is not fun stuff 😅😅. I have been using svelte kit for 3 days and I can already see why its so good. Thanks for the brief tutorial !
@JoyofCodeDev
10 ай бұрын
Thank you! 😄
Good morning, teacher. First and foremost, I must thank you for the great dedication present in this video. The content is excellent. I don't want to take up too much of your time. I just want to let you know that, as a self-taught student, I find your work invaluable. I'm reaching out to briefly mention that while working with this video at the 2:20:00 mark and in the +page.svelte file, an error appeared when using the word 'post' in the 'hgroup' and 'div'. I'm mentioning this because it might be of interest to you. The only way to solve this issue was by removing the three 'post' occurrences, and that way, all the content I was expecting rendered on the screen, and my errors disappeared. Well, I hope I'm not bothering you with my comment. Once again, I'm deeply grateful, as other methods were giving me quite a hard time. I hope you have a good week.
@JoyofCodeDev
10 ай бұрын
I appreciate you for taking the time to provide feedback. 🙏
I don't get why this video doesn't have hundreds of thousands of views if not a million plus
Now that's something! Thank you! How about mobile development with Svelte? That area is never covered anywhere. Svelte Native is a black box. Svelte with Capacitor is a complete mystery. Also PWA with Svelte... How does it work?
@SoreBrain
Жыл бұрын
I would like to see something like svelte + electron too
In the time it must have taken to craft this video, SK went and did away with the need to manually import ./$types !! It's now built straight into the VSC extension.
@JoyofCodeDev
Жыл бұрын
I started the SvelteKit series over 3 months ago! 😄
I'm using Angular, but thiiiis man... this is a m a z i n g 🚀 Why? => SIMPLE => CLEAN => INTUITIVE PS: Keep up your interesting presentation because you are cracking these learning videos ⭐
amazing! great work, just one question did I miss it maybe or you didnt cover query params?
@JoyofCodeDev
Жыл бұрын
There's an example using query params.
thanks for this amazing tutorial. I'm wonder if there is a way to create SPA for my website?
@JoyofCodeDev
11 ай бұрын
There is: kit.svelte.dev/docs/single-page-apps.
Interesting. Did you decide to check by this video if it's still worth to write this kind of long tutorial things? Inspired by the last video.
@JoyofCodeDev
Жыл бұрын
It's easier to discover and I already made the series which serves both audiences.
Vercel is awesome
"What does X do? X gon give it to ya" got me rolling ngl 😂
Thanks for this awesome course. One question, do I need to have a basic idea of Svelte for this course ?
@JoyofCodeDev
Жыл бұрын
Yeah! 😄
@dev.mufeedcm
Жыл бұрын
did u learn svelte 😄
@thedevnoteyt
Жыл бұрын
@@dev.mufeedcm still learning :)
Please do a follow-up using TRPC!
@SoreBrain
Жыл бұрын
Joy of code seems to be the kinda svelte guy that would say sveltekit doesn't need trpc but I would like to see a follow up too. Would probably catch the attention of t3 Fans.
🎉🎉🎉
Nice job 😮. Exist a git repo of this code?
@JoyofCodeDev
Жыл бұрын
Not every section has it but each one has a post you can find in the description.
great work. are you working on something similar for the new sveltekit version?
@JoyofCodeDev
3 ай бұрын
SvelteKit is not changed.
Hi. May I know the theme you were using for vscode? Love the colors
@JoyofCodeDev
Жыл бұрын
joyofcode.xyz/uses
Can you please add one video dedicated for debugging SSR flow in SvelteKit? Thanks!
What VSCode extensions were you using during this video?
2:22:15 How did message data and post data combined together into the type PageData? Shouldn't you need a LayoutData type to get the message string?
1:33:00 what happens if slugify gets the same title? It adds something to be different like "same-title1"?
Parsing formData on all urls can be a loophole for attacks and parsing all data as well. It is open to attacks focused on slowing down the system, increasing memory consumption... I believe that parsing only what matters and where necessary would be correct. Does anyone know any form parse lib that does this, receives the expected keys, reads the data without loading it into memory and parses only what is enabled?
Could you please make one video for i18n? I've use typesafe-i18n but somewhat not satisfied.
what shortcut use to generate or JSON.stringify() in one go?
@JoyofCodeDev
7 ай бұрын
I made a video on it: kzread.info/dash/bejne/f56XqY-lZZnPZso.html.
I noticed something : At 2:08:22 const response = await fetch('/api/posts'); const posts : Post[] = await response.json(); So do we need to have await for a response too since we have already received the result ?
@kyoumei
5 ай бұрын
The json() method returns a promise, so you need to await it. Otherwise, you'll get a promise of Posts which you can't really do much with synchronously
한국어. 자막이있다면 너무좋았을거에요. 감사합니다
Try drizzle orm instead of Prisma 🎉
@JoyofCodeDev
Жыл бұрын
It's on my list.
Hello JoC, do you plan to record a material like this about SvelteKit 2?
@JoyofCodeDev
7 ай бұрын
SvelteKit 2 is mostly just a version bump with some improvements because they upgraded to Vite 5 but there are no major breaking changes and everything works the same as before.
@ilahazs
6 ай бұрын
It's almost indentical
Sorry, about the section of form enhancement around 3:35:00 you say that you can do checks before the form submits, and use "check if username is available before submitting" example. Can I ask how can you perform this type of action if it needs to be performed by the server, checking the database? Using an API call? I think that using enhance, I will display the error after I did the check in the server file, am I wrong?
@JoyofCodeDev
10 ай бұрын
You do it inside the form action.
@novakoder
10 ай бұрын
@@JoyofCodeDev Let's say I'm using PocketBase as database, I can't (or usually I don't) use it in the +page.svelte but in the +page.server.ts. You will do it with an api fetch or something similar?
You created an api with svelte, does that mean I don't need a backend server because I can do everything with svelte except the database?
@JoyofCodeDev
2 ай бұрын
It depends what you're doing.