The Svelte 5 Migration Guide

  Рет қаралды 6,327

Joy of Code

Joy of Code

Күн бұрын

Пікірлер: 58
@JoyofCodeDev
@JoyofCodeDev Ай бұрын
Svelte 4 legacy docs: v4.svelte.dev/
@StephenFosterUK
@StephenFosterUK Ай бұрын
Great to see someone take us through the migration by first reading the docs, then running migrate and then upgrading stuff. I mean I struggled to read the docs on your screen as you enabled "sans serif" of course as I'm used to the Serif now ;)
@kvetoslavnovak423
@kvetoslavnovak423 Ай бұрын
Big thank you for this video.t Tying auto migration script some days ago was a bummer for me having all the same issues as you show in this video. Glad to see all the manual work that has to be done, which is not a little TBO.
@jonellwood9212
@jonellwood9212 Ай бұрын
If the Svelte Team does not hire you, they are crazy. Your videos are one of two devs that are my go to for Svelte stuff. I love your stuff, and the way you present it. Thank you for putting this content out.
@WhatNameHere
@WhatNameHere Ай бұрын
Who’s the second guy
@JoyofCodeDev
@JoyofCodeDev Ай бұрын
I need answers
@pookiepats
@pookiepats 13 күн бұрын
i can never finish this dude's video because of all the breaks he takes to polish Rich's knob, like dude - have some of your own opinions otherwise it just comes off as cheap and not authentic. He was glazing Svelte 3 and 4 for all the things Svelte 5 changed and now he's doing it again ffs please name the other guy I would like to check him out too
@vyntrixdev
@vyntrixdev Ай бұрын
50 Minutes peak content!!!
@arunkumarTdr
@arunkumarTdr Ай бұрын
Dude 🎉 , Thank you ❤❤❤
@jazza231
@jazza231 Ай бұрын
The Svelte Cinematic Universe
@armantgold
@armantgold Ай бұрын
Actually quite interesting and actually felt like Svelte 5 might actually be showing up other JS frameworks for a change actually. Actually just wish you actually made the actual code available actually for study purposes. Actually hard sometimes with just a video to actually see the extent of the actual implementation. But still actually really cool how Svelte 5 actually works.
@SoloElROY
@SoloElROY Ай бұрын
🤯
@JoyofCodeDev
@JoyofCodeDev Ай бұрын
here's the pull request I made: github.com/mattcroat/joy-of-code/pull/179.
@ba8e
@ba8e Ай бұрын
Needs more actually, actually.
@abtix
@abtix Ай бұрын
I was in the middle of doing this literally just now, this was perfect timing.
@a7mdbest15
@a7mdbest15 Ай бұрын
I migrated my system to svelte-5 using the cli and it went down xD, i think ill need a time its not that easy for everyone, I appreciate the video though thank you, very helpful.
@JoyofCodeDev
@JoyofCodeDev Ай бұрын
I hope you got it sorted 😄
@firstname-lastname
@firstname-lastname Ай бұрын
this video is a pure gold, thanks!!!
@kmaximoff
@kmaximoff Ай бұрын
Hey thank you for a video, about to watch right on time. I am mostly struggling to understand best arch pattern for data loading and putting it in a global state. Before this used to be done in Stores, now we have options to do it with svelte.ts. Do you have examples how can we update svelte.ts and load data from DB, or when svelte.ts updates we push data back to DB?
@JoyofCodeDev
@JoyofCodeDev Ай бұрын
you can use `get/set` or `$effect` for side effects like I show in the last example
@kmaximoff
@kmaximoff Ай бұрын
@@JoyofCodeDev but I believe you could run stores in server side or in +page.server.ts can we do the same with runes? Ps. Is there a right way: functions / classes to use for preferences in your example ?
@JoyofCodeDev
@JoyofCodeDev Ай бұрын
Using stores on the server was always discouraged unless you know what you're doing, so I would say the same is true for runes - you can get the data from the server and then update the store. It doesn't matter if you use functions or classes, and you also don't have to use accessors and can use functions instead, but I think `.value` is nicer than `.value()`. Classes provide a nicer developer experience since Svelte creates the `get/set` methods for you, but you always have control over it. You can learn more here: svelte.dev/docs/kit/state-management.
@kmaximoff
@kmaximoff Ай бұрын
@@JoyofCodeDev thank you!!🙏
@kvetoslavnovak423
@kvetoslavnovak423 Ай бұрын
§effect() doesn’t run on server
@すべてに興味を失う
@すべてに興味を失う Ай бұрын
Maybe you could replace all your @media rules with @container rules :D Here for exemple : 27:20
@JoyofCodeDev
@JoyofCodeDev Ай бұрын
yeah I should try it
@rasyasejati
@rasyasejati 19 күн бұрын
thank god the legacy is still supported
@good-dev-student
@good-dev-student Ай бұрын
Thanks 🎉❤
@guzidev
@guzidev Ай бұрын
How can I event bubble?! 😢
@ozgurNY
@ozgurNY Ай бұрын
Pass a callback as a PROP from the Parent to its immediate Child. Make your Child component invoke the callback function instead of using dispatch() for Custom Events. However, if you want your Child component to bubble DOM Events, then use the same technique: pass a callback instead of event forwarding and invoke it. Note that if there are other components between the Parent and the Child in the hierarchy, you can use Context.
@babakfp
@babakfp Ай бұрын
8:30 It's not possible to put that reactive variable in a .svelte.ts file, and no one talks about how stupid it is.
@tranquangthang8897
@tranquangthang8897 Ай бұрын
What do you really mean it worked just as fine for me I can use $state in a .svelte.ts file and the compiler can track its changes like the whole purpose of rune is pretty much to solve this issue
@babakfp
@babakfp Ай бұрын
@@tranquangthang8897 Create it in a `.svelte.js` file and import it in a `.svelte` file. Use a button to add to it, and you will get an error saying (... ... import...). I forgot the error message. It doesn't work. You need to create an object instead. Like `$state({ value: 0 })`, and do it like `count.value` lol. Their playground doesn't work for me right now, so I can't send you a URL to reproduce it easily.
@babakfp
@babakfp Ай бұрын
F*ck this garbage platform. It didn't send my first reply. Here is the second try. """ Create it in a `.svelte.js` file and import it in a `.svelte` file. Use a button to add to it, and you will get an error saying (... ... import...). I forgot the error message. It doesn't work. You need to create an object instead. Like `$state({ value: 0 })`, and do it like `count.value` lol. Their playground doesn't work for me right now, so I can't send you a URL to reproduce it easily. """
@babakfp
@babakfp Ай бұрын
Broooooooooooooooooooooooooooooooooo, I sent 3 comments and none of them show up here. WTF is wrong with KZbin... This should be f***ing illegal
@babakfp
@babakfp Ай бұрын
I can't send the link here. Go reproduce it yourself. This trash platform hides/deletes comments for no reason.
@dei8bit
@dei8bit Ай бұрын
Let's GOOOO!!!!!!!!!!!!!!!!!!!!
@DoctorMandible
@DoctorMandible Ай бұрын
This got really into the weeds
@ok-alarm
@ok-alarm Ай бұрын
💯
@noob-qk7mo
@noob-qk7mo Ай бұрын
lets go
@JoyofCodeDev
@JoyofCodeDev Ай бұрын
👏
Different Ways To Share State In Svelte 5
28:41
Joy of Code
Рет қаралды 11 М.
Creating Reactive Browser APIs In Svelte
18:21
Joy of Code
Рет қаралды 1,4 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
Svelte 5 Is Like React, But Better
19:33
Theo - t3․gg
Рет қаралды 81 М.
Rich Harris - North Star, JSNation US 2024
22:04
JavaScript Conferences by GitNation
Рет қаралды 1,4 М.
Use Svelte 5 Snippets To Reuse Markup Without Creating Components
17:41
Svelte 5 Preview | Runes
12:40
ThePrimeTime
Рет қаралды 80 М.
Master The Svelte Context API
18:07
Joy of Code
Рет қаралды 8 М.
Svelte Is Good For Beginners
9:28
ThePrimeTime
Рет қаралды 84 М.
I Tried Every Svelte UI Library
20:57
Joy of Code
Рет қаралды 54 М.
Svelte 5: In Action | Build A Tasks App
21:40
Syntax
Рет қаралды 8 М.
Svelte 5's Secret Weapon: Classes + Context
18:14
Huntabyte
Рет қаралды 30 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН