Svelte 5 Preview | Runes

  Рет қаралды 77,916

ThePrimeTime

ThePrimeTime

Күн бұрын

Recorded live on twitch, GET IN
/ theprimeagen
Reviewed article: svelte.dev/blo...
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
turso.tech/dee...

Пікірлер: 270
@maninalift
@maninalift Жыл бұрын
All the magic is in the $ for that nostalgic feeling of when you first discovered jQuery after trying to write IE6-compatible plain js for the first years of your webdeveloper life 😂
@AndrewStuart2
@AndrewStuart2 Жыл бұрын
And the magic of angularjs (1.x) for me.
@GrantGryczan
@GrantGryczan Жыл бұрын
For those not a fan of this: `$state` is just a compiler hint! It doesn't actually affect the value of the variable _at all._ The variable still literally equals its value. If you do `let count = $state(0)`, then `count === 0` will be true. It's the `count` variable itself that becomes reactive, not its value. If you assign its value to a different variable, its reactivity isn't copied. *I'm still not a fan of the `$state(...)` syntax because it doesn't make that clear at all.* Due to this common confusion, I think putting runes on the right-hand side of the equal sign was the wrong move, since it has nothing to do with what the variable is being set to. This would be much clearer and simpler imo: let $count = 0; Then it clearly communicates it's the variable that's reactive, not its value. And as a bonus, then dollar signs would explicitly indicate everywhere reactivity is present in your app. (But then you'd also have to think of better syntax for `$derived` which has the same problem.)
@DomskiPlays
@DomskiPlays Жыл бұрын
I prefer your way. The code even just looking like React makes me smadge
@jaideepshekhar4621
@jaideepshekhar4621 11 ай бұрын
Exactly. You already have the $: x = y syntax. Just please use that.
@chudchadanstud
@chudchadanstud Ай бұрын
No one is complaining about that. They're complaining about Language bloat
@GrantGryczan
@GrantGryczan Ай бұрын
@@chudchadanstud Huh? How is this any more bloated than how it was done before? They just replaced the old system with a new one.
@blancfilms
@blancfilms Жыл бұрын
That trick to break into out of the outer loop from an inner loop at around 04:00 was great. I have definitely found myself having to break out of an inner loop in the past and didnt know how to do this!
@P4INKiller
@P4INKiller Жыл бұрын
i = j = 9000;
@monad_tcp
@monad_tcp Жыл бұрын
you break by using a "GOTO", I'm kidding
@yblackfrost
@yblackfrost Жыл бұрын
Vue did not start SFC. Vue modeled its API and single-file components after Ractive.js, the predecessor of Svelte.
@daleryanaldover6545
@daleryanaldover6545 Жыл бұрын
Yes, many people have misconceptions about SFC. When svelte was announced together with how SFC works, Evan quickly explored the possibility and implemented it in Vue and that is how Vue compositions API was born (and the moving away from Vue2 options API began). Like how Evan took the better parts of react, the vue team also tried to explore implementing a compiler runtime which obviously would not be feasible because it will change the entirety of the runtime engine as mentioned in Vue 3 docs. Same thing with Quik and Astro, all those better parts cannot be implemented with Vue due to how the initial runtime is designed.
@mariogutierrez4989
@mariogutierrez4989 Жыл бұрын
Feature sets do seem to be converging among Svelte, Vue, Solid (React is not signals based) on the surface. The difference is Svelte is a compiler. Runes are first and foremost hints that can be optimally compiled for reactivity or server side use. Didn't Rich show runes compiling to noop in simple cases? It's vanilla JS at that point.
@vitiok78
@vitiok78 Жыл бұрын
Hmmm... Svelte is becoming a compiled version of Vue 3 now...
@coldestbeer
@coldestbeer Жыл бұрын
Vue OWNS svelte
@hamm8934
@hamm8934 Жыл бұрын
Always has been. From its single file component architecture to its minimal syntax with script setup. I’ll stick with Vue though because it’s 100% completely native JS, unlike sveltes compiler magic. Also, I can use Vue without a build step if need be.
@bobDotJS
@bobDotJS Жыл бұрын
I don't quite get why people prefer svelte over Vue. I use Vue at work and Nuxt is actually 🔥🔥
@vitiok78
@vitiok78 Жыл бұрын
@@bobDotJS The killing feature for me personally is Vuetify.
@hamm8934
@hamm8934 Жыл бұрын
@@bobDotJSnuxt 3’s dev tools are a game changer! It’s hard to work on frontend code without them Also useFetch makes react server components look like a chump
@dzisonline
@dzisonline Жыл бұрын
Svelte, be careful with my heart. Please do not become React. Don't make me write code just to tell your library how to function.
@baxalasse
@baxalasse Жыл бұрын
Agree 100%
@can.slaughter
@can.slaughter Жыл бұрын
$store == useState 🤣🤣
@avishjha4030
@avishjha4030 Жыл бұрын
Thanks for teaching me about labels! That's gold!
@SilvestreVivo
@SilvestreVivo Жыл бұрын
if $effect had another name, people would stop to make references to React. The concepts are not the same.
@fitemilkhero
@fitemilkhero Жыл бұрын
It's literally the same thing now. 😂
@SilvestreVivo
@SilvestreVivo Жыл бұрын
@@fitemilkhero definitely no. You don’t have to deal with the useEffect craziness
@brod515
@brod515 Жыл бұрын
🤔 it does have another name... `watchEffect` ... I think it's called.
@noherczeg
@noherczeg Жыл бұрын
What craziness? @@SilvestreVivo
@fennecbesixdouze1794
@fennecbesixdouze1794 Жыл бұрын
@@noherczeg Manually managing reactive dependency arrays.
@Kane0123
@Kane0123 Жыл бұрын
Runes have two connotations for me - spending far too long in Lower Kurast or laying land mines in Skyrim… neither feels good to have involved in my code base.
@hamm8934
@hamm8934 Жыл бұрын
Also death knights button mashing in WoW
@guhkunpatata3150
@guhkunpatata3150 11 ай бұрын
did not see that coming
@oscarstorm4694
@oscarstorm4694 10 ай бұрын
That reference to D2 got me, i feel you!
@alexgerdisch
@alexgerdisch Жыл бұрын
I’ve been dealing with the $ and stores quirks first hand. Very excited for svelte5 to drop. I used to be excited for new games to release… now I just patiently wait for rich to send dopamine. Pls don’t make us wait sveltekit long for this
@MahbuburRahman-uc7np
@MahbuburRahman-uc7np Жыл бұрын
Basically Svelte is becoming in Vue 3 and I can finally also add another JS framwork to my CV :)
@tharnos767
@tharnos767 Жыл бұрын
With all these new frameworks coming out and these major changes to existing ones, I'm more confident by the day that Vue was right all along.
@nooalovern
@nooalovern Жыл бұрын
Virtual DOM :/
@dejangegic
@dejangegic Жыл бұрын
I used to be a Vue guy, it's really good, especially compared to React and Ang**ar. But give Svelte a try, it's a breath of fresh air. You can just ignore runes
@hamm8934
@hamm8934 Жыл бұрын
@@nooalovern they’re adding vapor mode this quarter which is signals that you can enable at the app or component level and will work without a build step as well
@modernkennnern
@modernkennnern Жыл бұрын
"right all along". You are aware that they did a huge change as well just a few years ago, right? Vue has gone through 3 main phases as well; Vue options API (The old, ugly, domain-cutting syntax), Vue Class Components(The old, 2nd-party, class-based boilerplate-ridden syntax), and the most recent composition API. All of the major languages have had major changes throughout the years; Svelte is far from alone in this. React has had the most
@hamm8934
@hamm8934 Жыл бұрын
@@modernkennnern I think he’s referring to Evan You’s “svelte script” tweet about the problem with having a separate JS environment in the compiler
@nightshade427
@nightshade427 Жыл бұрын
So svelte is now vue? They're nearly 1:1 now in look and feel and behavior. I think it's crazy no one ever talks about vue on these channels (like it's the red headed step child), but then it's like all these frameworks are becoming more and more vue like, and they are praising them, but still ignore vue?
@maharta8458
@maharta8458 Жыл бұрын
Yeah it's weird
@fennecbesixdouze1794
@fennecbesixdouze1794 Жыл бұрын
Not quite. It's like Vue 3, but not quite as nice because of all the baggage tacked on from the old API.
@anthonysteinerv
@anthonysteinerv Жыл бұрын
what crack u smokin?
@anj000
@anj000 Жыл бұрын
I'm always confused about HTMX. Internally I feel like it appeared two weeks ago, but Prime is acting like he was building large scale production apps with it for years. Is it really that good or it is just new and no major flaws were found yet?
@daliareds
@daliareds Жыл бұрын
In truth, HTMX is just a modern way to do something people were doing before the whole client rendering craze. I reckon he's excited about it because he's primarily a backend dev and it lets him control the state of the app entirely on the server and not have two copies of the same state that could go out of sync It might be like how Rust was for him, he was head over heels for it for months and then one day he snapped and stopped recommending it
@ryanleemartin7758
@ryanleemartin7758 Жыл бұрын
@@daliaredsThe Rust leadership took a giant shit in the punch bowl. He still recommends Rust for some stuff but yeah, he got out of the cult just in time.
@TurtleKwitty
@TurtleKwitty Жыл бұрын
HTMX the name and tiny scripting language is fairly new but the concepts it puts forwards are the literal building stones of the web with a bit more flexibility now that we have JS.
@crab-cake
@crab-cake Жыл бұрын
@@ryanleemartin7758 "just in time"? the rust drama is extremely overblown at this point. if it were as big a deal as you were implying companies would be dropping it. there is drama with every language.
@ryanleemartin7758
@ryanleemartin7758 Жыл бұрын
@@crab-cake I referenced the leadership. The drama is just a symptom of the real problem with Rust which is: "Rust will always be political". That, in my view, is a poison pill and a breeding ground for cultish behavior and a wellspring for endless drama. Some people don't want to deal with that crap, it's extremely offputting.. way more than tech related drama or individual personality drama. If you are into the politics that Rust supports then you think it's all good, nothing to see here and the world is being saved by Rust. to which I say.. good luck. It is a great language.
@danvilela
@danvilela Жыл бұрын
They say knockout was right but you can change it to Vue. It’s exactly the same as composition api
@chaselewis6534
@chaselewis6534 Жыл бұрын
svelte is my framework of choice, but what keeps it out of a lot of projects is the UI libraries just aren't up to snuff for it yet. So quick & dirty often is easier in other languages. Soon as a couple better libraries popup for it probably be the only UI library I use.
@chychywoohoo
@chychywoohoo 11 ай бұрын
what about skeleton ui?
@guhkunpatata3150
@guhkunpatata3150 11 ай бұрын
flowbite is good
@ozgurNY
@ozgurNY 2 ай бұрын
Appreciated your honesty. Svelte 5 runed Svelte.
@complexity5545
@complexity5545 Жыл бұрын
I'm into svelte because of the author; that's pretty much the only reason (and it easy to sling up a svelte websites in 30 minutes compared to reactjs). I can comeback to the code in 2 months and recall svelte better than reactjs. Ecommerce doesn't need crazy JS libraries. I don't know what the heck everybody else is doing with a website. **UPDATE**: Oh yeah, I remember. All this JS craziness came when Steve Jobs killed off Flash. And still to this date, we don't have a flash replacement for the the creative types.
@puffin_000
@puffin_000 Жыл бұрын
I think Webgl is cover the creativeness side of things.
@Manas-co8wl
@Manas-co8wl 9 ай бұрын
Well we have (had, until its disastrous blunder) Unity on the game side, the animators moved on to Krita or other tools I don't know of (if they don't use Animate), and some of them who took a liking to as3 actually developed Haxe. Also social media as a whole developed such as KZbin or Soundcloud. And yes we have had WebGL for quite a while now, so I'm not really sure we need flash again.
@raenastra
@raenastra Жыл бұрын
hilarious in the comments that moving from let count = 0 to let count = $state(0) means that Svelte is dead and lost its simplicity. interesting priorities if you've written/refactored enough reactive $ statements in the current version of Svelte you'll understand why unifying this part of the API makes sense. signals seem to be the most clear way to offer reactivity
@fennecbesixdouze1794
@fennecbesixdouze1794 Жыл бұрын
Yes but this could have been unified far less cumbersomely if the APIs didn't already have all the baggage of Svelte's mistaken insistence of building in magic pixie dust.
@danvilela
@danvilela Жыл бұрын
I mean. Now it’s a runtime thing. Also, Vue still have a bigger ecosystem.. i kinda want to try Vue again after this news..
@RiadDZz
@RiadDZz Жыл бұрын
I think people just dont like the "$", (JQuery PTSD ?) why not just make it "state(0)"
@WalterWoshid
@WalterWoshid Жыл бұрын
@@RiadDZz No, the $ is not the problem, the problem is that it really loses its simplicity. That's why I loved it, but now I am not so sure anymore.
@danvilela
@danvilela Жыл бұрын
@@RiadDZz php ptsd..
@Jeff-co.
@Jeff-co. 3 ай бұрын
Svelte is amazing... was amazing. Just like Vue, Svelte had an original and unique idea of how to handle state and build pages. It was its own thing, different from Angular/React/Vue. But now, just like Vue 3, Svelte 5 is slowly changing into React. This thing about "$derived", "$state", "$effect", is all just React useMemo, useState, useEffect. Vue stopped being Vue on version 3, and so its originallity lasted 2 versions (up to Vue 2). Now Svelte's originallity would've lasted 4 versions, because version 5 just proved, yet again, that React has been right all along. Two amazing frameworks, Vue and Svelte, who started gorgeouslly doing their own thing and making devs around the world fall in love and have faith in modern JS, have now copied React and become what they were originally trying to defeat. What a sad time for all JS devs. I'll have to keep with Svelte 3/4, just like I've kept with Vue 2. Knockout was right all along. Svelte... was amazing.
@ymi_yugy3133
@ymi_yugy3133 Жыл бұрын
Maybe I'm wrong about this, but I'll never use loop labels instead of found variables. In fact I try to avoid control statements in general.
@n4bb12
@n4bb12 Жыл бұрын
They fixed all the things that bothered me about Svelte.
@netssrmrz
@netssrmrz Жыл бұрын
Runes look interesting but I can't shake off a feeling of deja vu. It feels like an admission that the previous scheme didn't really work, in the same way that React introduced functions/hooks to "fix" classes. Also, not keen on "features" that seem like a different way to do the same thing. Starts to taste like syntactic sugar.
@akirakosaintjust
@akirakosaintjust Жыл бұрын
a feeling of deja Vue
@imxd9698
@imxd9698 Жыл бұрын
Svelte is finally growing up!
@NaveedAli-n5g
@NaveedAli-n5g 3 ай бұрын
it avoided react, now it's becoming react. NOICE.
@fennecbesixdouze1794
@fennecbesixdouze1794 Жыл бұрын
So in other words it's taken six years, but the Svelte team is finally taking Evan You's famous "svelte-script" tweet to heart. Glad the Vue team also took the tweet to heart and abandoned the reactivity transform proposal.
@vikingthedude
@vikingthedude Жыл бұрын
I think about that tweet everytime i look at svelte code
@terionname
@terionname Жыл бұрын
Name reactivity functions with fancy word and make marketing) Now it's code looks even more like vue3 =)
@noherczeg
@noherczeg Жыл бұрын
Learning compiler - driven behavior is much worse than learning plain API-s. The fact that you don't even need to import $props or $derived should also be classified as "magic". In e.g. React I can observe every available API by pressing Ctrl + Space in the import block which is a native language feature.
@kitastro
@kitastro Жыл бұрын
its rethinking 'rethinking reactivity'
@YaroslavFedevych
@YaroslavFedevych Жыл бұрын
„Knockout was right all along”? The joke’s on you, I’ve been just using Knockout all along!
@j1d7s
@j1d7s Жыл бұрын
I wouldn't use a coin to decide between React and Angular, I would use a 20-sided dice and pick Angular when it shows 21. For me the current hierarchy is htmx > Svelte > Solid > ClojureScript > React > a pile of horse manure > Angular.
@JakoTheWacko
@JakoTheWacko Жыл бұрын
Where does vue fit in?
@hamm8934
@hamm8934 Жыл бұрын
And Vue has been trumping them all for years
@shrin210
@shrin210 Жыл бұрын
why svelte > solid Performance is better of solid
@j1d7s
@j1d7s Жыл бұрын
@@JakoTheWacko I did not comment on frameworks that I did not use, which is the case with Vue.
@j1d7s
@j1d7s Жыл бұрын
@@shrin210 Maybe, I but like the Svelte approach and syntax in particular more.
@EskoLuontola
@EskoLuontola Жыл бұрын
Strangely I remember Knockout. Planetary Annihilation's UI uses it, so I've used Knockout when writing PA mods. I never used it for web dev.
@francisgeorge7639
@francisgeorge7639 Жыл бұрын
"Needn't" upper class English english. Our colonists often think even the English of the plebiscite speak upper class english but the real thing is very rare. Rich Harris has it with I think a northern lilt (not sure about that). He sounds like he went to Harrow or Eton. Harrow is for the upper class upper classes, Eton for the upper-middle classes with pretensions, like Harry and William.
@zzyzxyz5419
@zzyzxyz5419 Жыл бұрын
so the svelte team built vue 3 but backwards? 😂
@TheHackysack
@TheHackysack Жыл бұрын
I learned Python before I learned Bash, so imagine my frustration when I learned that breaking out of nested for-loops was very straightforward in Bash, but required extra work in Python. w=3 for x in {0..9}; do for y in {0..9}; do for z in {0..9}; do if ((x + y + z == 10)); then break "${w}" fi done done done printf "%s, %s, %s " "${x}" "${y}" "${z}" or some shit
@ProfRoxas
@ProfRoxas Жыл бұрын
I remember i once learned labels, maybe it was Java, then i missed it in some other language Usually you can replace it with functions and return if it's a simple one, like inner-outer loops only
@theohallenius8882
@theohallenius8882 Жыл бұрын
Don't like this direction of Svelte, so far never had any issues with the way I use Svelte now. At least current API is not deprecated, so that's a plus+
@_y7ya
@_y7ya Жыл бұрын
They plan to deprecate/completely delete it in svelte 6/7.
@hamm8934
@hamm8934 Жыл бұрын
Theyve needed to fix this since the start
@WinterHawke
@WinterHawke Жыл бұрын
I'm also skeptical, it feels like we're losing the best parts of svelte and making more react -like. I like the store changes. But everything else seems unnecessary.
@_y7ya
@_y7ya Жыл бұрын
@@WinterHawke Yeah agreed, I already had a hard time convincing colleagues to use svelte over react, now there's even less reason to switch. And if performance was really an issue, solidjs would make more sense.
@Raynhardx
@Raynhardx Жыл бұрын
Look at the introduction video. It's still svelte. The termonology "signal", "effect" and "state" are unfortunate. You draw a connections with patterns that emerged in other frameworks you clearly dislike. But that is not what svelte is doing here. Watch the video. It's nothing like that signals/react/vue at all. Instead of highjacking javascript `let x = 1` and `$: y = 2 * x`, you write instead `let x = $state(1)` and `y = $derived(2 * x)`. You don't even import `$state` and `$derived`. Those are just markers for the compiler, not functions. Nothing else changes, except that those things now work outsite .svelte files and in nested code.
@andzagorulko
@andzagorulko Жыл бұрын
So svelte 5 is vue 3. Ok.
@buc991
@buc991 Жыл бұрын
and vue 3 is just worse react
@ghalamat2821
@ghalamat2821 Жыл бұрын
@@buc991 I am curious what made you come up with this idea
@faridguzman91
@faridguzman91 Жыл бұрын
@@buc991how can you be so wrong lol
@anthonysteinerv
@anthonysteinerv Жыл бұрын
yeah but worse, heavier, and slower and wrapper dependent
@evax2975
@evax2975 Жыл бұрын
that minecraft kind of shit at 2:28 got me laughing so hard
@fennecbesixdouze1794
@fennecbesixdouze1794 Жыл бұрын
"This works well... until it doesn't." Describes literally the entire design of Svelte. Something like $derived is just plain wrong. It doesn't solve the problem. area = $derived(width + height) is not any more ergonomic than area = computed(() => width.value + height.value) all it is is simply worse. Because if I look at the latter, I actually know what it is. There is no magic. I can refactor it, it works just like any other javascript. There are no red functions and blue functions.
@nomadshiba
@nomadshiba Жыл бұрын
i agree but there is one problem when you have it inside a function, within the html template, you can't narrow types well i have been writing my own hobby ui framework, its a problem, solid has the same problem as well. its not about its ergonomics its not nice, but a good solution for narrowing issue
@anthonysteinerv
@anthonysteinerv Жыл бұрын
I guess when you don't go to college and you are simply a braindead frontend dev I can see how compilers can be magic to the plebs.
@grinsk3ks
@grinsk3ks Жыл бұрын
5:40 that's why I love vue. You can extract component code into plain js by just copying it. That's what threw me of svelte. Using writeable was kinda weird.
@cooltune
@cooltune Жыл бұрын
Yeah I don't think a lot of people realize this. the power of writing the same code inside components and es-modules, is the most liberating thing.
@RiadDZz
@RiadDZz Жыл бұрын
so svelte made a full circle back to Vue 3 🤔
@daltonyon
@daltonyon Жыл бұрын
Interesting, I put Svelte in my pocket to playing later!
@brunor.922
@brunor.922 Жыл бұрын
How to loop WITHOUT loop in GoLang import "fmt" func main() { A: fmt.Println("A") fmt.Println("B") goto A // i love the fact that goto statements are available inside go }
@bjesuiter
@bjesuiter Жыл бұрын
Nice, exactly appeared at the start of the segment
@Wielorybkek
@Wielorybkek Жыл бұрын
I like Angular
@patricknelson
@patricknelson Жыл бұрын
I saw their demo for declaring props, which is def nice since it has additional features and is a good option. That said: I still really like the elegance and simplicity of “export let” as your means of defining props. At least aesthetically. 🤷‍♂️ Hope that doesn’t go away in Svelte 6, for example.
@a-yon_n
@a-yon_n Жыл бұрын
Isn’t rune a data type that stores codes that represent Unicode characters, aka code point?
@soundrightmusic
@soundrightmusic Жыл бұрын
Svelte becoming Vue
@oskrm
@oskrm Жыл бұрын
1:30 That's Rich lol
@CrzyMan_Personal
@CrzyMan_Personal Жыл бұрын
Svelte is going from a soft magic system to a hard magic system. People are smad about it
@Eldarlll
@Eldarlll 9 ай бұрын
Underrated joke
@beebomation4508
@beebomation4508 8 ай бұрын
love this
@PwrXenon
@PwrXenon Жыл бұрын
Best framework is state on the backend and dom manipulations when needed ❤
@LightTheMars
@LightTheMars Жыл бұрын
Every library is converging towards the React model. About time.
@henriquekirchheck
@henriquekirchheck Жыл бұрын
React but signals, solid was right
@hamm8934
@hamm8934 Жыл бұрын
Converting to Vue, not react
@buc991
@buc991 Жыл бұрын
@@hamm8934 vue just taking stuff from react and renaming it
@buc991
@buc991 Жыл бұрын
because react is the best one, almost no point to use anything else
@hamm8934
@hamm8934 Жыл бұрын
@@buc991 a case for using anything else: you have a large GUI table and need up update values reactively in the table. Good luck doing this with your vdom
@ktoxcon
@ktoxcon Ай бұрын
So basically Svelte is becoming React
@mpiorowski
@mpiorowski Жыл бұрын
Svelte Power!
@bunnykek
@bunnykek 5 ай бұрын
11:33 lmao funny af
@oussama40612
@oussama40612 Жыл бұрын
Svelte's syntax seems to become worse every time
@DarrylHebbes
@DarrylHebbes 7 ай бұрын
The appearance of the word colour most likely means Rich Harris himself wrote it.
@TheVertical92
@TheVertical92 11 ай бұрын
I dont think i like the direction svelte is going with this. This feels like Vue3. And what about TS?
@nextorLeon
@nextorLeon Жыл бұрын
instead of outer i always use "break dance"
@NotherPleb
@NotherPleb Жыл бұрын
I'm not sure I like the direction svelte is taking
@vert3cx373
@vert3cx373 Жыл бұрын
The “$” syntax just reminds me of AngularJS, so much trauma.
@dinyox
@dinyox Жыл бұрын
Funny, vue tried to become svelte with $ref() and ditch '.value' using reactivity transform though they canceled it. Everything is just going circle lmao.
@eppiox
@eppiox Жыл бұрын
always hated 'effect' as a name.. feels like it makes sense to be named something else
@КонстантинТарасов-к6щ
@КонстантинТарасов-к6щ Жыл бұрын
Yet another atomic store like reatom. Reinvented. Congratulations 🎉
@solitary200
@solitary200 Жыл бұрын
Svelte #1
@shadow_vertex
@shadow_vertex Жыл бұрын
Most important part of the video 2:28
@DreanPetruza
@DreanPetruza Жыл бұрын
$ brings me nightmares from my 17 years of PHP. Ugh! Also, is Svelte turning silently into React?
@hamm8934
@hamm8934 Жыл бұрын
Looks like Vue 3 now has shorter syntax for state than Svelte let count = ref(0) let count = $state(0) Idt this matters though. The code golf people like to play with stuff like this is so silly
@fennecbesixdouze1794
@fennecbesixdouze1794 Жыл бұрын
Don't underestimate the burden of having to use `writeable` in your stores just to move it from the SFC to a composable. 99.99999% of stores in Vue can just use plain refs with composition API. Even if you reach for Pinia for the added super powers, it's 100% compatible with the composition API which means it's a copy-past refactor.
@hamm8934
@hamm8934 Жыл бұрын
@@fennecbesixdouze1794 I hadnt considered that. I've been with vue since the start of the vue 3 beta and haven't found any reason to switch
@mkvetny
@mkvetny Жыл бұрын
You can skip the .value in Svelte when updating the value count.value++ count++
@hamm8934
@hamm8934 Жыл бұрын
@mkvetny vue is removing the .value when they release vapor mode. But even still, count is a proxy object, so .value makes sense
@jonathangamble
@jonathangamble Жыл бұрын
Quik too buddy!
@JoepKockelkorn
@JoepKockelkorn Жыл бұрын
How come no one mentions Qwik also has these already with the additional benefit of breaking stuff up into chunks and improving time-to-interaction? $state = signal $effect = useTask$/useVisibleTask$/useResource$ $derived = useComputed$ $props = just normal function args
@aislanarislou
@aislanarislou Жыл бұрын
" useTask$/useVisibleTask$/useResource$ " ---> what a strange names... duurrrrr!!!!!!!!!
@brod515
@brod515 Жыл бұрын
I don't care about who came up with what first... but as a Vue developer as soon as I saw $derived and $effect on the screen I immediately knew what they were. like without a doubt. Vue & Svelte should just unify... It really doesn't make any technical sense to be two different projects.
@PanosPitsi
@PanosPitsi Жыл бұрын
Vue has a virtual dom svelte is compiled to vanilla js. Literally nothing is the same under hood.
@hamm8934
@hamm8934 Жыл бұрын
@user-fr2fm3ri3w Vue is adding vapor mode this quarter which is signals that can be enabled at the app or component level. vdom will be optional.
@typoerror177
@typoerror177 Жыл бұрын
@@PanosPitsiA ‘vapor mode’ is being developed currently, and it will make it closer to svelte 😄
@brod515
@brod515 Жыл бұрын
yes you can point out there singular difference and assume that they are wholey different. but what about all there similarities.. they are continously integrating features from each other. and just like someone said In a VueJS conference this year in Amsterdam; Evan showcased something called vapor that will be a svelte like approach to compiling. In my mind there is absolutely no reason for this to be two different things if they were to just merge into one things (I mean svelte, solid and vue). simply decide what the best approach to compiling is ( or have different types ) but they are implementing the same features continuosly . Vue seems to have a great approach in general what they need is the svelte runtime to be integrated into it. why wouldn't this make more sense.
@PaulVarna
@PaulVarna Жыл бұрын
Vue is trying to get rid of DOM via Vapor. So we're almost there.
@XKCDism
@XKCDism Жыл бұрын
thank you for the minecraft slurp
@pesterenan
@pesterenan Жыл бұрын
The coin flip hahhahahha
@breezycodes
@breezycodes Жыл бұрын
Vue 3? Yay 🎉
@frazuppi4897
@frazuppi4897 Жыл бұрын
this new reactive update looks good
@thesaintseiya
@thesaintseiya 10 ай бұрын
I am glad I'm investing time into Solid instead of Svelte haha No point to learn Svelte 5 when you already know Vue 3, especially when their syntax is horrible...
@gustavbw
@gustavbw Жыл бұрын
Softcore React
@chm10323
@chm10323 Жыл бұрын
finally the svelte claim that they make a witchcraft; how magically cool it is
@chm10323
@chm10323 Жыл бұрын
but I support the lifecycle instead of just $effect,
@jrmc732
@jrmc732 Жыл бұрын
Turns out the: Svelte is just "let count = 0;" was a mistake just like the React guys where telling you for years. :d
@hamm8934
@hamm8934 Жыл бұрын
Yup. I’m a Vue guy, but I’ve been saying since 2020 that svelte’s decision to make its own JS environment in the compiler is absolutely a misstep that’ll cause more headache down the road.
@RolandAyala
@RolandAyala Жыл бұрын
Lol. My thoughts exactly.
@jrmc732
@jrmc732 11 ай бұрын
One positive sideeffect runes will have is for the first time Svelte devs will have an aha moment and understand/learn React.js😂 I know the underlying reactive model is different but at that time Svelte absorbed many people who jumped straight into Svelte without knowing JS and they where easily confused/distracted by simple function calls or destructuring and the same devs will now for sure feel more ready to write more complex code without complaining.
@shariar13877
@shariar13877 Жыл бұрын
Thoughts on angular breaking changes??
@noherczeg
@noherczeg Жыл бұрын
Please tell me why is manually creating a wrapper function for state a good thing all of a sudden? It's like a custom hook, what is all the hype about?
@hootmx198
@hootmx198 7 ай бұрын
Reusing stateful logic across components required stores and the store contract is rather awkward. If you want to reference the current state of a store outside of .svelte file you have to use a helper function which comes with a warning that it is not efficient and should be avoided in hot code paths. Runes fix that.
@fitemilkhero
@fitemilkhero Жыл бұрын
Am I missing something, I thought the whole point of svelte was that you could just write vanilla JS and it'd be reactive out of the box? Now it just seems like it's a version of react which requires less typing and if that's the case it's not that compelling.
@simplatory802
@simplatory802 Жыл бұрын
Yeah, Svelte is dead.
@hamm8934
@hamm8934 Жыл бұрын
Svelte was never vanilla js. It was a completely different JavaScript environment. These changes are making it actual vanilla js (or closer to it). For instance, let count = 0 being reactive state is not vanilla JavaScript. If I write this in a js file, this will not be reactive. If however, I create a proxy function to reflect state changes (such as in Vue) and call it ref(), this is vanilla JavaScript.
@SvelteSociety
@SvelteSociety Жыл бұрын
*chefs kiss*
@sinasalahshour
@sinasalahshour Жыл бұрын
svelte is nice
@rapzid3536
@rapzid3536 Жыл бұрын
Mobx and chill going on 7 years.
@thierrybeaulieu4403
@thierrybeaulieu4403 Жыл бұрын
this guy works at Netflix btw
@nykowow
@nykowow 5 ай бұрын
How can I achieve routing in htmx?
@dracula5752
@dracula5752 Жыл бұрын
i choose vue because had nice router but now seems like i made right choose
@mariogutierrez4989
@mariogutierrez4989 Жыл бұрын
Unless I'm mistaken, runes are analagous to Vue's `ref`, `computed`, `watchEffect`. From what I've read in blogs, SvelteKit is the reason to stay with Svelte over Nuxt+Vue.
@monad_tcp
@monad_tcp Жыл бұрын
7:09 they finally killed React
@ba8e
@ba8e Жыл бұрын
Svelte saved my fucking life!
@venir_dev
@venir_dev Жыл бұрын
> signals have been popularised by Solid ACHKUTALLY, the first doing it after knockout was Vue3's composition API, which is identical to Svelte 5, but people be hatin' on that ecosystem lmao
@fennecbesixdouze1794
@fennecbesixdouze1794 Жыл бұрын
Well, much of the ecosystem is still stuck on Vue 2. And Vue 3 still allows you to use the options API if you want, which is not a plus. Imagine going into an industry job where half the code base is still using options API and half is composition: it's the worst of both worlds. Even if you're starting a new project write now, make sure to set up your pipelines to reject any PR that contains the words "defineComponent", or you're only one clueless junior away from having that hot garbage littering your code base.
@SXsoft99
@SXsoft99 Жыл бұрын
Js using $, finally you can get as much dolars as in php taking the joke aside, it's like you write code in C with pointers
@programaths
@programaths Жыл бұрын
And those who don't know about function use two nested for with a break. 😂
@kibaakashi9602
@kibaakashi9602 Жыл бұрын
Goodbye svelte
@monad_tcp
@monad_tcp Жыл бұрын
When I'm going to see Elm-like things ?
@justingolden21
@justingolden21 7 ай бұрын
Comments on how "needn't" is a silly word when "ridonkulously" is one sentence later and then doesn't say anything about it
@sh4d20w
@sh4d20w Жыл бұрын
hahaha that was good :D about quitting :D
@brokula1312
@brokula1312 Жыл бұрын
This is screaming Vue3. Incredible how stupid and hype driven JS community is. We switched from React to Vue3 exactyl because Vue's programming model is the easiest and most flexible thing out there.
From Svelte to Go and HTMX
24:04
ThePrimeTime
Рет қаралды 156 М.
Why Svelte is BETTER Than React | Prime Reacts
11:28
ThePrimeTime
Рет қаралды 173 М.
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 128 МЛН
Svelte 5's Secret Weapon: Classes + Context
18:14
Huntabyte
Рет қаралды 20 М.
Svelte 5: Introducing Runes... with Rich Harris
12:35
Svelte Society
Рет қаралды 94 М.
Go 1.22 - Fixes For Loops | Prime News
7:41
ThePrimeTime
Рет қаралды 70 М.
CREATOR OF SVELTE From TS TO JSDoc??
19:53
ThePrimeTime
Рет қаралды 73 М.
Svelte Is Good For Beginners
9:28
ThePrimeTime
Рет қаралды 79 М.
HTMX Sucks
31:45
ThePrimeTime
Рет қаралды 143 М.
Svelte 5 Runes - How to talk to the compiler ft Rich Harris
27:34
The Truth About HTMX | Prime Reacts
49:56
ThePrimeTime
Рет қаралды 371 М.
v0.dev - WOW!! This IS WILD
19:56
ThePrimeTime
Рет қаралды 124 М.