Тёмный

Why Svelte is BETTER Than React | Prime Reacts 

ThePrimeTime
Подписаться 450 тыс.
Просмотров 164 тыс.
50% 1

Recorded live on twitch, GET IN
/ theprimeagen
Article: hackmd.io/@Wg20j1S6Q8m8uV7j44...
Twitter handle: / roguegpu
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact

Наука

Опубликовано:

 

12 июл 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 634   
@OneBrighDay
@OneBrighDay 10 месяцев назад
I have to admit I’m surprised on how many people seem to be against Svelte. I’m not saying stake your professional life on it but for all intents and purposes it feels amazing to work with.
@chepulis
@chepulis 10 месяцев назад
This feels like that XQCD comic where the cpu overheating was mapped onto a key and a user was mad at the people who solved the problem.
@raianmr2843
@raianmr2843 10 месяцев назад
It's only natural that people who don't get to pick what they'll be working with will get angry at even the slightest indication that they're stuck with a subpar piece of technology.
@neociber24
@neociber24 10 месяцев назад
For me I never felt people are against Svelte but they want X they use in React and is not in Svelte. I think we should make the libraries headless and then create adapters
@OneBrighDay
@OneBrighDay 10 месяцев назад
@@neociber24 I’m sure you are right, maybe ppl aren’t against Svelte as much as they want a React version of it so they don’t have to change the way they code. Which is understandable. For me libraries like SolidJS is the React of the future but Svelte seems more like a completely different approach.
@cholst1
@cholst1 10 месяцев назад
I just hate JSX tbf
@paypalmymoneydfs
@paypalmymoneydfs 10 месяцев назад
React winning makes as much sense as Java winning. They're not the best but they arrived early and enterprises don't want to migrate.
@clickrush
@clickrush 10 месяцев назад
React didn’t arrive early. Plenty of other frameworks came before. It was just the first of its kind. React is was the first that had the right blend of ergonomics and was easy to reason about. It was a breath of fresh air.
@ccgarciab
@ccgarciab 10 месяцев назад
​@@clickrush > It was just the first of its kind In other words, it was early
@vaisakhkm783
@vaisakhkm783 10 месяцев назад
​@@clickrush i would like to say same things about the svelte
@JEsterCW
@JEsterCW 10 месяцев назад
No cap
@kyle8575
@kyle8575 10 месяцев назад
Comparing a JS framework to Java hurts my soul but I get your point.
@dzisonline
@dzisonline 10 месяцев назад
Svelte needs to win... for my sanity.
@vaisakhkm783
@vaisakhkm783 10 месяцев назад
Yes, i almost stopped webdev, until svelte arrived.... then i regreeted going soo deep into networking, linux certifications and cyber sec only to come back to frontend due to svelte
@gappergob6169
@gappergob6169 10 месяцев назад
Whatever at this point. Just want some stable simple library.
@ba8e
@ba8e 10 месяцев назад
Absolutely! Svelte saved my career. Thank fuck I'm using it for my own business, otherwise I'd be jobless since I refuse to work with the piece of shit that is React.
@herrpez
@herrpez 10 месяцев назад
There is no sanity in JS.
@sapkra
@sapkra 10 месяцев назад
I could also write an article about why svelte is way worse than react because they added too many stupid abstraction layers which always break with the JS ecosystem... You don't write JS/TS anymore, you write Svelte...
@nyashachiroro2531
@nyashachiroro2531 10 месяцев назад
When you are so used to complexity simplicity feels like it's a lie, like it's magic. Whenever I hear people say they'll use React over Svelte they say Svelte is just too much magic and React is just JS. But the truth is all of these frameworks are doing some magical stuff under the hood that is irrelevant to building products. Maybe with React you need to know how it works under the hood because there's just a lot of foot guns but that's a non-issue most of the time. You can do well just knowing how to build stuff with React without necessarily understanding how it works under the hood. The other day I read a comment on Twitter where someone argued that they don't like Svelte because you can't write hooks in it. Why would you need to write hooks in Svelte? You can (since they are just functions that start with "use" basically). But why? Svelte is not React. Some people seem to fail to understand that. What would be the point of creating another framework that does what React already does? Svelte is Svelte and there's the Svelte way of doing things. Don't know why someone would expect React stuff in Svelte. This whole "the downside of Svelte is it's not React, nor does it work like React" thing needs to stop.
@CottidaeSEA
@CottidaeSEA 10 месяцев назад
Some JavaScript devs don't even know how to work outside of React, so I'm guessing that's a big issue. I've only used Svelte for a really small project, so I can't really comment on it as a framework/library, but my experience using it was pleasant.
@nyashachiroro2531
@nyashachiroro2531 10 месяцев назад
@@CottidaeSEA You see. The argument are really irrelevant. If you can build a product with the thing, use the thing. It's crazy if I had to first understand the Go compiler before I can write a backend in Go.
@TCH534
@TCH534 10 месяцев назад
I read a comment on Reddit where some guy said React is good for building production apps because you’re using building blocks instead of sand. Like sir, no.
@luizcastro5246
@luizcastro5246 10 месяцев назад
learn to space paragraphs please for the love of god
@nyashachiroro2531
@nyashachiroro2531 10 месяцев назад
@@TCH534 Like what do you even mean by that sir 😂😂😂 No. Just no.
@Wzymedia
@Wzymedia 10 месяцев назад
React devs wake up everyday and choose complexity
@user-fr2fm3ri3w
@user-fr2fm3ri3w 10 месяцев назад
We wake up and choose not to be unemployed
@sexymeal2427
@sexymeal2427 10 месяцев назад
@@user-fr2fm3ri3w True artisans
@raianmr2843
@raianmr2843 10 месяцев назад
imagine spending thousands of hours learning a piece of technology only to face the same few types of bugs that complete noobies face over and over again. react is simultaneously one of the best investments in a webdev's life and one of the worst investments in a programmer's life.
@user-fr2fm3ri3w
@user-fr2fm3ri3w 10 месяцев назад
@@raianmr2843 vanilla react legit has practically 0 bugs if you start installing random npm packages you will bash your head on a wall.
@everythinggoes850
@everythinggoes850 10 месяцев назад
​@@user-fr2fm3ri3wso did jquery devs 10 years ago
@AScribblingTurtle
@AScribblingTurtle 10 месяцев назад
Svelte is awesome. I managed to convince our company to use it for a couple of SPA projects. Prototyping is super fast. The Builds integrate well with our existing system and our designer does not even need to learn anything new since we can just take the mockup pages she builds us and throw them into some components. With a few exceptions, everything is just vanilla HTML/JS/CSS . 😍 My personal favorite is the svelte/transitions. They make navigation so much clearer and all it takes is a"transition:[style]" attribute on whatever tag, you are removing are adding.
@abrahamsimonramirez2933
@abrahamsimonramirez2933 3 месяца назад
Is your company hiring, I can do even part-time remotely
@happyaccidents156
@happyaccidents156 10 месяцев назад
I'm so happy Svelte came out when it did. As someone who finds myself leaning more toward the backend, I love how I can still make decent front ends with svelte without much fuss.
@everythinggoes850
@everythinggoes850 10 месяцев назад
I feel like most developers who love svelte are actually backend devs.
@ko-Daegu
@ko-Daegu 10 месяцев назад
@@everythinggoes850 woah same here as well I love svelte and astro they just make sense
10 месяцев назад
@@everythinggoes850 Wow... didnt know it was a trend lol same here
@vaisakhkm783
@vaisakhkm783 10 месяцев назад
​@@everythinggoes850i would say too... i am a java backend dev, yet still i wasn't using any frontend framework other than vanillajs and backend templeting engines until svelte came arrived
@fullserstorm83
@fullserstorm83 10 месяцев назад
​@@everythinggoes850 actually made productions apps on vue over react for that reason... two backend developers (me and our senior at the time) who just wanted to write frontend like javascript and not have to remember what "reactscript" is like from time to time
@hyscript7
@hyscript7 10 месяцев назад
The world is simply not ready for this masterpiece called Svelte
@salvadorroibon
@salvadorroibon 10 месяцев назад
Word.
@icarusgk
@icarusgk 10 месяцев назад
Svelte and Vue 3 are in fact very similar! 🎨 They both have a block for styling the component ➡ Vue 3 also has a State Management baked right into the framework 😄under one single API ref() Which works exactly the same as solid/store and svelte/store
@js-ny2ru
@js-ny2ru 10 месяцев назад
Vue 3 is awesome. I also love Pinia for State Management.
@hamm8934
@hamm8934 10 месяцев назад
Also Vue has the benefit of being completely valid JavaScript, supports native web components, and can be used without a build step, which is a godsend when you have to integrate with an annoying vendor or customer. It’s just so portable and straight forward.
@chrisnaadhi
@chrisnaadhi 10 месяцев назад
yeah vue 3 with composition api was great and look like svelte, i'm always recommend it when working inteam when i'm doing solo project my bet always be svelte
@OzzyTheGiant
@OzzyTheGiant 10 месяцев назад
I have gripes with Vue 3 though. Composition API would have been ok if they didn't focus so much on forcing the reactivity model on us. Some of us prefer to organize UI in classes, and when they killed off Class API, they neglected half of the community that chose Vue for it's previous vue-property-decorator APIs and for allowing us to use OOP principles. They lost my trust. To me Vue seems like it just wants to ride the React bandwagon because React devs can't bother learning anything else
@Klrfl101
@Klrfl101 10 месяцев назад
​@@OzzyTheGiantbut you can still use the options API??
@dermachedjamel8970
@dermachedjamel8970 10 месяцев назад
I started with Vuejs and then went to react. I have the same arguments for why i chose Vue over react for personal projects React made me love Vue even more.
@PaulSpades
@PaulSpades 10 месяцев назад
Having looked at react after angular and before vue, and after vue again.... the react ecosystem is just completely mad and react apps are steaming piles of donkey which should be buried as deep as possible where they can never be found, just like the angular ones. I'm ashamed of being part of the frontend developer community because of these spectacularly obvious crimes against humanity and programming.
@nyashachiroro2531
@nyashachiroro2531 10 месяцев назад
Vue is even making good strides in the simplicity department. I started with Vue, moved to React and now React and Svelte are my main. I understand.
@MIO9_sh
@MIO9_sh 10 месяцев назад
@@PaulSpades If you talk about steaming donkey, the same is here with Vue, but just Vue 2. Situation is getting much better with Vue3's composition API now, which encourages the use of typescript, which enforces more typing, and therefore less donkey. Let's face it, garbage piling up is a must for any antique ecosystems, only to be cleaned up when the next breaking update comes.
@nooalovern
@nooalovern 10 месяцев назад
@@MIO9_sh Type less = make more money. Weird concept for "programmers", i know.
@theworldismine7788
@theworldismine7788 10 месяцев назад
Which one is better Vue or Svelte?
@raenastra
@raenastra 10 месяцев назад
this is too well-timed with theo's last video
@nyashachiroro2531
@nyashachiroro2531 10 месяцев назад
People did not like that video 😂😂😂 And I get it.
@faridguzman91
@faridguzman91 10 месяцев назад
link?
@nyashachiroro2531
@nyashachiroro2531 10 месяцев назад
@@faridguzman91 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-uEx9sZvTwuI.html
@jamlie977
@jamlie977 10 месяцев назад
@@faridguzman91 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-uEx9sZvTwuI.html
@NECOdes
@NECOdes 10 месяцев назад
that video was a massive react dev copium lol
@raizdesamauma8607
@raizdesamauma8607 10 месяцев назад
I feel bad for all the developers that know React sucks but still have to face it everyday at work. I use Vue btw.
@OzzyTheGiant
@OzzyTheGiant 10 месяцев назад
You and me both! The only way I can win the battles is by forcing Class components where possible, using a sensible state management system (no Contexts, I don't want giant component trees looking like bird wings), separating concerns as much as possible, keeping components small, and organizing code in functional components so that variables are the top, followed by closure functions (functions that don't need the outer scope get tossed out of the component or in another file), then effects, then any logic for data transformation, and finally the render. People need to learn standards, for god's sakes!
@just5559
@just5559 7 месяцев назад
I chose to start a new company project in react, and later asked for us to change to vue - didnt happen, but we started using zustand, which made the whole project actually plausible. Vue is simply better than react - use whatever you want, but please let react die, people.
@daedalus5070
@daedalus5070 10 месяцев назад
Currently doing React project and I think its time for it die off. Syntax / patterns are pure nonsense at times.
@MIO9_sh
@MIO9_sh 10 месяцев назад
20 lines in react, 4 lines in vue. You know where this is going... The mindset of how react handles reactivity, and how it throws all the responsibility of handling reactivity to the developer is just, very counter-productive in a fast paced environment. For 80% of the time we just need a value to update when the model changes, we don't care about handling the getters setters and setting signals and dependencies for that, just do it in the framework itself and expose options when we needed it.
@daedalus5070
@daedalus5070 10 месяцев назад
@@MIO9_sh Yeah Vue/Svelte both good! I don't buy a lot of arguments that are made in Reacts favor these days either. > Libraries - not an issue > Performance - Worst out of all of the main ones > Big Community/Usage - Ok so JQuery is good then? In principle the idea of components: state, logic and structure/markup in a single sile makes sense but every other framework does it in a way that is easier to understand, is more performant and doesnt have a mental model that makes me want to put my keyboard through the screen. Then the latest drama about Server Components and Next App Router... just too much noise going on there for me. Svelte 4/5 by contrast: - Reduced bundle to 70% of prev version - They got the Inferno JS guy on board (as if it could be much more performant) - Typesafety actually works 🤷🏻‍♂
@OzzyTheGiant
@OzzyTheGiant 10 месяцев назад
@@daedalus5070 Agreed, I knew the only way we were gonna get improved type safety and better performance is to just restart from the ground up, and Svelte is that answer. But no, React devs just being sheep, it's like arguing with Apple fanboys.
@summerWTFE
@summerWTFE 10 месяцев назад
I’ve been doing mostly front-for 20+ years now and Svelte is the only one that just clicked right out of the box.
@superwin06
@superwin06 10 месяцев назад
I took about 3 to 5 react courses on udemy/youtube and still don't understand how react works. Then I found svelte and tried to code along with youtube tutorial and it just clicked. I love its straightforward and direct approach to front end dev.
@denniszenanywhere
@denniszenanywhere 7 месяцев назад
Really? I took many react courses on Udemy, front end masters and scrimba and gave up. Maybe I should I try svelte
@bit9524
@bit9524 6 месяцев назад
For me it was different story, read the docs, read the docs of redux, got a simple crash course, and boom, plain and easy, I mean, compared to angular(used at my job), everything feels straight forward to me.
@ftwtf
@ftwtf 3 месяца назад
Same here. In my case I have 2 projects with react for my girlfriend and when I have to create a new functionality I fear that I have forgotten many "tricks" to understand react...again.
@deado7282
@deado7282 10 месяцев назад
Svelte(no kit) + Go(serving svelte using static) + SQLC + Postgres LOVE
@daedalus5070
@daedalus5070 10 месяцев назад
Chap called Ben Davis has been working on A Go + SvelteKit project and ended up dropping Go in the end as Sveltekit did everything he wanted. Was cool to see how much he could get done without a "Traditional" backend
@AdroSlice
@AdroSlice 10 месяцев назад
​@@daedalus5070Similar thing with a project im working on, i went from always-online offline-first app dev and it's so much better, so much easier to extend to online again as well
@deado7282
@deado7282 10 месяцев назад
@@daedalus5070 Yep. I saw that one. Kit&Go as a double Backend doesn't make a lot of sense. I dropped Kit and not go though. A lot better than using js in the backend especially if u work with raw SQL most of the time.
@nyashachiroro2531
@nyashachiroro2531 10 месяцев назад
@@daedalus5070 His argument for dropping Go made sense since having Go and SvelteKit in the same project was basically having 2 backends. Go might perform better in backend tasks but it's going to be a while before any performance optimizations are needed for most projects. A lot of projects suffer from premature optimization.
@deado7282
@deado7282 10 месяцев назад
​@@nyashachiroro2531​ In my case performance was not a criteria. I decided to go with go because i like the language, it's paradigms & the tools. Writing applications with a traditional backend & go turned out to work better for me. I ran into a lot of issues with dbaas & orm's in JS. It's easier to deal with these issues in a clear seperated backend & raw SQL and not at a higher level after 17 abstractions.
@MichelleHell
@MichelleHell 10 месяцев назад
With CSS i've learned to put a box around every single html element. Then when I'm done, i remove all the borders. It's the only way to actually know what your front end is doing. Once you've got the picture frame set up, you can make it look pretty.
@Grom1477
@Grom1477 10 месяцев назад
Have you ever heard about DevTools?
@Time2paw
@Time2paw 10 месяцев назад
Dev what? I write my code on paper then use notepad.
@Semicorpus
@Semicorpus 10 месяцев назад
Using * {outline: 1px red} is the best to understand display and position and to quickly « draw » the blocks before starting the « painting » part. I remember that this was my go-to technique and there’s not a thing that surprise me in display/position anymore thanks to this habit
@likwidsage
@likwidsage 10 месяцев назад
Frontend development is hard because it involves a lot more art than other parts of a programming. The general public feels like they're experts in how things are supposed to work and front end devs have to deal with those expectations. Imagine that "this sucks, let me build a better one line" except it's not just from devs, but everyone that touches a device.
@ea_naseer
@ea_naseer 10 месяцев назад
Not really art more like engineering. You have to architect to be fast because everybody wants fast, you have to think about whether you are building Facebook or building a mom and pop shop, you have to reason your own sanity as a developer... one problem I see lack of architectural knowledge across the board which includes knowledge of scale. I work on a project that's php last version rewritten to php new version not much changed but the previous architecture didn't scale. End of story.
@likwidsage
@likwidsage 10 месяцев назад
@@ea_naseer It is engineering, but there is a much larger art component to it compared to systems/backend programming. No public person is going to care about your backend, hell they probably don't know/care enough to even know that there is a backend. In essence, backend development deals with computers which don't have opinions and are pretty consistent. Front end devs deals with that and people, who have too many opinions and vary so much that they tend to contradict themselves.
@drygordspellweaver8761
@drygordspellweaver8761 9 месяцев назад
I wouldn’t call it “development” by any means. More like copy-pasting.
@likwidsage
@likwidsage 9 месяцев назад
@@drygordspellweaver8761 that's more a self tell than anything
@drygordspellweaver8761
@drygordspellweaver8761 9 месяцев назад
@@likwidsage I could code circles around you, squid.
@JosephMcMurray1984
@JosephMcMurray1984 10 месяцев назад
Man, that React Wrapper paragraph really hit home with me. I used AnimeJS in a React project and had to build a useAnime hook to wrap around the functionality of animejs. Not the biggest issue and fairly simple to setup.....but.....I like that in SolidJS I can just use the god damn library, similar to Svelte.
@enriquejosemunozavellan5517
@enriquejosemunozavellan5517 10 месяцев назад
Man could you please explain why do you need to create that hook? I want to get it
@JosephMcMurray1984
@JosephMcMurray1984 10 месяцев назад
@@enriquejosemunozavellan5517 I had animation properties that updated so I needed it to react to those effects.
@tedchirvasiu
@tedchirvasiu 10 месяцев назад
Not a Svelte user, but let me get this straight, so at 7:57 what that $ sign means is that the gridObject gets recreated as a whole from the Grid class every time $rowData gets mutated?
@katech6020
@katech6020 8 месяцев назад
​​​@@tedchirvasiuany variable that starts with $ is a store. blocks that starts with $ are reactive code (code that rerun when any of the referenced variables change, kinda like useEffect but smarter and without needing a dependency array)
@sathishkannan6600
@sathishkannan6600 10 месяцев назад
I absolutely agree with him on grid. It works well until you need to style it. Whenever I need to do design table. I rather create flex components with fixed width and length and some scroll overflow property.
@carstenbottcher8504
@carstenbottcher8504 10 месяцев назад
I use Svelte for a private project for two years. Professionally, I have to work with ReactJS and it feels so wrong. Had to work on two bugs this week, and it is so annoying when you debug a component, and it gets initialized over and over again. React is the main reason I will switch my job in September and gonna work as a Svelte developer then. 😄
@jingle1161
@jingle1161 9 месяцев назад
That's about the worst situation you can get into as a coder. Knowing how Svelte works but still having to deal with React (devs) in your daytime job.
@MrTuushar
@MrTuushar 10 месяцев назад
I posted a simple comparison on LinkedIn about form implementation in react vs svelte . 95% devs were agreeing with me but there we some which said : React is best cus of large community.😵‍💫
@josk8936
@josk8936 10 месяцев назад
You can link them this article now hahah
@ZAcharyIndy
@ZAcharyIndy 10 месяцев назад
I'm not interested in React since the first day I saw it. That day I was AngularJS adopter and made good damn money out of it. But, when Angular 2 comes up, it make me give up on it, I still remember testing angular 2 for the Hello World, took 250Mb of node module, and taking quiite high computer resource. Then I said goodbye completely. Then Vue arise, it almost closer to AngularJS v1 and many AngularJS adopters were move to Vue. Now, I'm so happy with Svelte. It simple, sleek, no shit bullshit here and there. Everything just feels natural without steeper learning curve.
@MrOnePieceRuffy
@MrOnePieceRuffy 10 месяцев назад
So it's clear, Angular 16 wins.
@YouTubePL666
@YouTubePL666 10 месяцев назад
maybe in alternate reality 😂
@theworldismine7788
@theworldismine7788 10 месяцев назад
No, Vue wins!
@OzzyTheGiant
@OzzyTheGiant 10 месяцев назад
No one wins so long as React keeps pushing for this everything-in-JS, one way data flow, hooks agenda. When React finally dies, everyone wins
@daninmanchester
@daninmanchester 10 месяцев назад
I'm not a pro dev but I love svelte for my side hustle projects. Sveltekit, SkeletonUI and SuperForms are a great way to get up and running quickly. My main issue is not being able to programmatically create routes, but I imagine that will come with time.
@sillygoogle9630
@sillygoogle9630 10 месяцев назад
Svelte doesn't let me comment out component props, which really frustrates me every time I use it. Other than that, svelte is really nice.
@AdroSlice
@AdroSlice 10 месяцев назад
What do you mean, comment out component props? Edit: Ooh, you mean in the template. Yeah, that's a consequence of the XML spec.
@ukaszzajac6704
@ukaszzajac6704 10 месяцев назад
its such a tiny thing but i have this problem every singular time i use svelte
@ko-Daegu
@ko-Daegu 10 месяцев назад
@@AdroSlice would you plz eleborate i didn't fully get him
@BabyPigmanRobot
@BabyPigmanRobot 10 месяцев назад
@@ko-Daegu In Svelte you can't do this: to temporarily comment out some of the props you're passing to the component.
@josk8936
@josk8936 10 месяцев назад
Did a quick 2s stack overflow search and looks like comments are actually markup (so is similar to which is invalid sytax), not only in svelte but in html. And knowing that svelte components are structured like html means that this is mostly not svelte's fault but htmls'
@figloalds
@figloalds 3 месяца назад
When I saw Svelte 5 my eyes teared up, it's the most beautiful thing I have seen in 11 years working as a Fullstack web developer. I've seen and used ostensively AngularJS, Angular 2~17, Vue, React, Svelte, glossed over Solid and Qwik, Svelte 5 is so good, so clever, so absolutely awesome, I want it so much. Svelte 5 feels to me like "Web finally done right.", it's a masterpiece
@liquidsnake6879
@liquidsnake6879 10 месяцев назад
Yeah, it's a good point people have come up with so many ways to overengineer and reinvent the same things over and over that not only is Frontend complex af now, it's also well removed from the actual bundle served to the client, so you actually have no real idea what you're pushing to production just that it works somehow. I really don't like it
@RaZziaN1
@RaZziaN1 10 месяцев назад
True. What is even more annyoing is pushing javascript everywhere even on servers - but hey never in real server always some serverless because js is not good enough. Js should stay as some scripting made for website, sprinkle of js not whole clout, but building everything from js made everything so slow, its unbearable. Facebook is slow, twitter is slow, youtube is also slow. The faster internet is the more junk is loaded to the browser.
@nyashachiroro2531
@nyashachiroro2531 10 месяцев назад
The older frameworks made people used to complexity that anything simple feels foreign. People just don't like anything simple anymore. Someone on Twitter said Zustand and Jotai can only be used on small projects, and Redux is the one for big projects. The reason - because they are too simple for large projects. What? It's crazy. Look at Angular - so much complexity that is not necessary at all. I get that some of it is for consistency and stability but I can't see the argument for functionality. Does it need to be that complex to achieve the same goal? I doubt.
@danko95bgd
@danko95bgd 10 месяцев назад
maybe because you are trash developer
@OzzyTheGiant
@OzzyTheGiant 10 месяцев назад
@@nyashachiroro2531 When you are switching between multiple front end projects, consistency is above everything. Context switching takes a mental toll on you. I say the same thing about programming languages in general, which is why I resolved to mastering core set of languages and frameworks and only replace them when something new and improved comes along.
@Slashx92
@Slashx92 10 месяцев назад
100% agree on the state managment libraries. Using redux-toolkit is too much learning and writing to just abstract reducers. Async reducers? Maybe thats not a good idea idk If you really need app-wide context why not use cookies, session tokens, localstorage sqlite or anything there instead of having this clusterfuck of abstractions just to manage app state when 99% of the times web apps are glorified crud forms
@Lemmy4555
@Lemmy4555 10 месяцев назад
I never used a table/grid library my whole life and i've managed to ship enterprise products featuring pagination/ordering/cool styling just with plain old table, css and some js :)
@mvargasmoran
@mvargasmoran 10 месяцев назад
Looks like Theo's take on anything not crappy react with nested ternaries.
@daleryanaldover6545
@daleryanaldover6545 10 месяцев назад
I am working on an internal service for our MVP (Aerial), it is built using Sveltekit and I can use most js libraries found in npm no problem. I had never been elated in writing code until I decided to use svelte. It is simply a js framework done right.
@kabukitheater9046
@kabukitheater9046 10 месяцев назад
svelte stores are really good.
@programaths
@programaths 10 месяцев назад
I have one project that deals with forms created by users and conditional validation also configured by users. Everything uses vanilla javascript; I only use one library for displaying PDFs and another for masked fields. There is a V2 using Angular, and it uses my cores. I don't do Angular yet; I am maintaining that project indirectly. I have to go into calls with the dev to explain how to create a proper wrapper for Angular...the thing "I don't know." I also have a nonexistent comment feature in V2 because it was already tough for me to do. It would be a monumental task in Angular, so it has been dropped. Also, my version is just faster for some reason. There is no loading screen because the form shows as soon as you land on the page. The Angular version has a nice 10-second loading animation! Fun how that works ^^
@rando521
@rando521 10 месяцев назад
svelte is a compiler ,react is a library and i still dont know why they are in the top5 frameworks
@clamhammer2463
@clamhammer2463 10 месяцев назад
Svetle is a transpiler.
@TheNewton
@TheNewton 10 месяцев назад
because people even experts conflate/misue the terms because of how binary they are and were lacking better concepts/words for everything in-between and around.
@gauravkelkar8824
@gauravkelkar8824 10 месяцев назад
Ohhhh boyyy do I have story for trading code for json... Now here I am an intern with a skewed vision of how easy react js, and i start working on creating a tab group UI component for the project. Now a tab group must have some data, let's add a data prop, it needs many buttons to run functions in the parent, BOOM add more fields... It needs to show modal pop ups and animations... Boom add more fields. This went on to the point what the tab group became a controlled component with the parent handling the entire logic, and that moment of 20 props hell it clicked.... What if, I just bundle up every thing into the data field with any type and call it a day. The code gets cleaner, I don't have to worry much about adding new props and I'll leave worrying about the code review to the future me... What's the worst that could happen?? The other interns seemed to like this idea and abused it to eternity till the point that the single component is conditionally rendering 5 different tab group styles and animations with the only way of adding new tabs was to abuse ?? on the json data. After the code reviewer went Duke nukem on our asses that week, we eventually settled on using tabData1 tabData2 ... With each prop having a type property specifying all the different implementations. And in true intern fashion, we left the company a month later
@marksto6581
@marksto6581 10 месяцев назад
@Primeagen, hey, but what about "code as data" approach (read "Lisp")?
@ethancfann
@ethancfann 10 месяцев назад
When people talk about the ecosystem what they really mean is "My job won't pay me to know about this"
@paracelsus_rose6934
@paracelsus_rose6934 10 месяцев назад
Vue is amazing also. New vue3 is so ergonomic to use
@js-ny2ru
@js-ny2ru 10 месяцев назад
Agree!
@KaSSa__
@KaSSa__ 10 месяцев назад
7:17 at my current job, using React, someone thought it was a good idea to write the whole UI using a JSON file... Worked great (no) until you had to add new components and interaction on the website
@aryajpegasus
@aryajpegasus 10 месяцев назад
why even use a framework at that point just write the document object itself xD
@MrCatgroove
@MrCatgroove 10 месяцев назад
imagine having a literal language (JSX) for markdown and then you represent all of your markdown with JSON anyway lol the worst part is that most tutorials do this as well there are much better patterns than passing giant objects, stuff like composite components, render props, proper hooks, etc.
@AliAliAli9Ali
@AliAliAli9Ali 4 месяца назад
Solidjs is the fastest when it comes to working with the DOM, followed by Vue and Svelte. Applications that don't use the virtual DOM (such those made using Solidjs and Svelte) run quicker overall, although they run slower on larger programs. Vapor Mode, a feature that Vue will soon leverage to become as fast as Solidjs, will make Vue3 and Nuxt3 the most integrated frameworks in terms of both speed and ecosystem.
@ilearncode7365
@ilearncode7365 10 месяцев назад
I love using Svelte Native to make iOS and Android apps!
@reikooters
@reikooters 10 месяцев назад
Svelte Native has been around for a few years now, but when I looked into it, it seemed like the project was all but abandoned, and supposedly people on the internet don't like NativeScript, so I never tried it. What do you think of it? We're currently building a mobile app using CapacitorJS, which takes a web front end and compiles it to a mobile app. Since you can use whatever front end you want, we're using Svelte + Routify (what I've used for the past 3.5 years), as well as Konsta UI, which provides native-looking components built using TailwindCSS. But our app isn't complete/in production yet, so don't have a complete story yet on how good it is. Looks good when running in emulators though.
@fred8
@fred8 10 месяцев назад
@@reikooters I'm working on a similar project, but using Nuxt and Vue3. Would be nice if you publish your results somewhere. Not much info on Capacitor apps in production unfortunately.
@xr.spedtech
@xr.spedtech 10 месяцев назад
Most of these frameworks are for UI. Everyone is fighting one another for it.
@markoffden
@markoffden 3 месяца назад
"JS with CSS is a path to hell" I used vanilla-extract on couple of my recent projects, and I think I found a good balance between style-components' overabstraction and css modules "just-enoughness". You write your styles with TS, it's scoped, lazy-loaded along with the rest of your component code, you can manage themes and global variables, you have one code standard for all the project code, because 99% of it is TS, you have intellisense and you have build-time compilation of you TS styles into regular CSS. And overall for me it just feels the right way to work with CSS in your project.
@richardrapstine9014
@richardrapstine9014 10 месяцев назад
Hey, it’s my submission! Thanks Prime!
@blenderpanzi
@blenderpanzi 10 месяцев назад
And the wrapper libraries then lack in type definitions for the giant option objects and you wonder why something doesn't work. Its because you passed the wrong options without noticing because the option property just has the type "any". (I use a react wrapper for Apache ECharts. Not because that is the best solution, but because it was the first thing that did what I needed and I got to work. There are so many charting libraries! Its a jungle.)
@DevBishwasBh
@DevBishwasBh 10 месяцев назад
Svelte is the boss! Svelte fan boy here. Also, you do not actually need a component library in Svelte. It provided a lot of features out of the box, like transition, animated and custom Create Events, and with Taiwind CSS, you're super packed.
@Arzen84
@Arzen84 10 месяцев назад
I have never used svelte before but I am considering more and more to try it out and introduce it to out team. The only thing I hate about comparing svelte and react that react is kind of "out of date". I hate when somebody says react sucks, vue sucks, etc... I would state anything about a technology without truly understanding it. I truly believe that react is amazing and it was an important milestone in the FE world and because of that and because all the good and bad it brought to the table we managed to improve and go beyond what react can provide to us. I proud and happy that I work with react, I have learnt a lot but now we have "cooler kid(s)" in the block and we might want to consider to slowly migrate or start the newer projects using these technologies.
@shaunthayil
@shaunthayil 10 месяцев назад
Absolutely love Svelte. I am lucky to be able use it at work. Waiting for the day Svelte slays the React demigorgon so that peace can be restored in the world
@edantas
@edantas 10 месяцев назад
The first 6 seconds of this video are gold
@eotikurac
@eotikurac 10 месяцев назад
i'm happiest with display: inline-block; and vertical-align: middle; you can do a lot with it.
@PaulSpades
@PaulSpades 10 месяцев назад
+1 Even when I need fancier alignment, swapping elements from display inline to flex is very fast and easy to understand. Moving blocks, row-columns and grid elements around is the bane of my existence in UI.
@dertuman
@dertuman 10 месяцев назад
i prefer always using flex, and with tailwind it's just one className, flex. Of course it depends what you're doing but there's nothing I haven't been able to not achieve with flex
@OzzyTheGiant
@OzzyTheGiant 10 месяцев назад
Flex solves everything for me, even CSS grids.
@emptybottle1200
@emptybottle1200 10 месяцев назад
i'll try that one!
@bagas5057
@bagas5057 10 месяцев назад
People need to realize that frameworks are only tools to deliver it products and thus, deliver business value. Easier framework = faster development cycle = faster for delivering value to users and GET FEEDBACKS. Of course if the website is the main driver of your company, then you might want a more complicated solution for a complicated problem. But going simpler is almost never bad
@TheNewton
@TheNewton 10 месяцев назад
People need to realize the differences between a library and a framework and temper there expectations when doing apples to orange comparisons. React is a library, svelte is a front end component framework( or language)
@bagas5057
@bagas5057 10 месяцев назад
Yes, technically, react is a library. A framework is a set of ways of doing things, libraries are just functions. By that definition, react could also counts as a framework because using react forces you to build UI in the "react way". Also react is bootstrapped with bunch of other libraries and stuffs. I would say a library is more like Axios, Lodash, etc.
@ayehavgunne
@ayehavgunne 10 месяцев назад
I see the same argument all the time for SolidJS. "I would use it in a heartbeat if only the community were larger." Well the community WOULD be larger if more of you would just use it! Damn chickens and eggs.
@OzzyTheGiant
@OzzyTheGiant 10 месяцев назад
exactly! I just hate that of all things people chose to "settle" on (thanks JS fatigue!), it had to be React. Sure, it started off awesome when we had class components and solved the pain points of Angular.js, but we are in different times now. It's time to let go and focus on Svelte!
@Jay-kb7if
@Jay-kb7if 10 месяцев назад
I feel like all front-end tools will be easily convertable in the near future so a lot of these debates seem moot to me. Use the one that makes you the most creative and comfortable for you.
@ninjatogo
@ninjatogo 10 месяцев назад
Question for the professionals. I just started learning front-end development at my job, and we're using React at the moment, but we're open to switching to Vue or something else entirely. Would it be a good idea to recommend Svelte to my team, or should I wait until it gains a bit more traction?
@DynastyInferno
@DynastyInferno 5 месяцев назад
Did you switch to svelte? say yes.
@malipetek
@malipetek 10 месяцев назад
Did you realize how short is this video. Svelte is simple, understanding why Svelte is better is also simple.
@FrederikSchumacher
@FrederikSchumacher 10 месяцев назад
Man, CCS3 and preprocessing like Sass/Less/PostCSS was all that's ever needed. Although I admit the svelte-style-block is nice, especially when used with PostCSS. People using and arguing for anything else just need to go back to 1995 and endure the AGE OF (TABLE) MISERY and styling attributes like font, bgcolor, background, color, foreground, fgcolor, cellpadding, cellspacing, border, etc, etc, etc... Especially Tailwind users. Those should live through those years at least 5-10 times.
@OzzyTheGiant
@OzzyTheGiant 10 месяцев назад
As a tailwind user, my approach isn't to make a giant line of class names, but to only sprinkle it in projects where I know either I'm gonna have a lot of customization or I'm gonna customize some components from another library. This means I use it only on small websites or web apps that import something like MUI, Vuetify, DaisyUI, Angular Material, whatever.
@MichaelMammoliti
@MichaelMammoliti 7 месяцев назад
I watched this video weeks ago and when you read "".. man.. I got hit very hard. It made me think a lot on what I've been doing for the past years. All the crap I've been brainwashed with. That's the one and only reason that made me switch from React to Svelte for my projects.
@ThePrimeTimeagen
@ThePrimeTimeagen 7 месяцев назад
love this
@santoshmore2953
@santoshmore2953 10 месяцев назад
Never ending debate
@a.c.vermillion
@a.c.vermillion 10 месяцев назад
I use Emotion and I love it. I don't use styled components, I use the `css` attribute. Same as the vanilla `style` but with TypeScript support. Best of the two worlds. Add the Emotion theme to the mix and you have the best styling solution in my opinion. Tailwind is also nice, but I'm not a huge fan of it even though it's quicker to understand sometimes.
@everdimension
@everdimension 10 месяцев назад
Cool vid, great article, but last argument completely misses the point. One of the reasons React became so popular is that you never needed wrapper libraries! React exposed an escape hatch to the DOM using refs and this thing was a game changer (compared to the UI frameworks we had before). You basically could just copy the "get started" code from any JS library and put it in componentDidMount and you're done! Add appropriate cleanups, and there you go - you have some charts among your react components. I agree though that abundance of react wrappers is indeed a weird problem. I don't know why everyone started writing those. The beauty of react was that you didn't need an ecosystem of packages, everyone could just write pure js because it's so easy to adopt in react code.
@RasmusSchultz
@RasmusSchultz 10 месяцев назад
man, this is just so on point, through and through 😂 ... not that I mind working with React at all - but I try to avoid piecing together a meta framework - just take what React provides and take ownership of the rest. It doesn't do much, but for most projects, that's fine. Preact does even less, and I like that even better. If your project does need all the features mentioned here, then yes, Svelte does seem to integrate those features a lot more fluently. I think some engineers get a little too excited about piecing together their own frameworks with React. 😏
@TheNewton
@TheNewton 10 месяцев назад
generating a meta-framework from libraries like react is probably the future with the advent of chatGPT we'll just input the concepts we need and for the sake of human collaboration it will pull in the conventions/features/terminology of existing libs/frameworks/languages.
@yuryprimakov4912
@yuryprimakov4912 10 месяцев назад
This is excellent! The article and the reaction is spot on. React is totally overrated and Svelte/SvelteKit greatly under appreciated. Currently building a project with Svelte for the first time and I love it.
@wforbes87
@wforbes87 10 месяцев назад
svelte sounds like vue with fewer steps
@asatorftw
@asatorftw 10 месяцев назад
Svelte literally saved my passion for programming.
@aizensoskue3880
@aizensoskue3880 10 месяцев назад
ping theo
@moneykumar4712
@moneykumar4712 10 месяцев назад
Is a native mobile app development library built into svelte as well?
@shubhambhattacharjee1111
@shubhambhattacharjee1111 10 месяцев назад
Try svelte-native then we'll talk
@shubhambhattacharjee1111
@shubhambhattacharjee1111 10 месяцев назад
Ohh also I should have asked it earlier, "would you like to bet your life on that?"
@bigmistqke
@bigmistqke 10 месяцев назад
Nativescript
@wadecodez
@wadecodez 10 месяцев назад
I would use svelte if it had vue3 composition API. I don’t mind DSLs for markup but modifying the JS syntax just feels weird.
@ryanshea5221
@ryanshea5221 10 месяцев назад
I get your comment about using JSON instead of code for config, but what about when the config is dynamic? I deal with a LOT of dynamic grids at work. I'm just curious for you to expound on your "path to hell" comment.
@ThePrimeTimeagen
@ThePrimeTimeagen 10 месяцев назад
its still the same problem. its either jsx or objects. you are generating them both, which makes more logical sense? i could see a path where an object is easier
@szymonbaranowski8184
@szymonbaranowski8184 10 месяцев назад
Building tower adding more where most put most before in selfaffirming loop. Is logic of termites React Termite Hivet is on top. Everyone constantly learning new versions, improvements mindboggling amount of time wasted. They are tired, everyone wants this to stop and one thing to win and offload the pain. Except majority is in the thing guaranteeing this hell continuing... while others kill each other to become the next hell. Even if it's great and optimised it can't beat the Moloch. Inertia builds the Babel Tower itself
@RolandAyala
@RolandAyala 10 месяцев назад
I love this channel -- hugely entertaining and informative. As for React, It's super easy to hate on it and no question Svelte is easier to pick-up and has better DX. Still, I found myself being more productive on React after giving Svelte, Solid, and Qwik an honest try because of ecosystem (Qwik is easily my favorite). I'm going to wait it out another couple years and see how things play out before re-evaluating switching off of React.
@OzzyTheGiant
@OzzyTheGiant 10 месяцев назад
Did you even watch the video?
@RolandAyala
@RolandAyala 10 месяцев назад
@@OzzyTheGiant yep, whole thing.
@nizomsidiq3
@nizomsidiq3 10 месяцев назад
yeah, because it pays well 😂
@RolandAyala
@RolandAyala 10 месяцев назад
@@OzzyTheGiant I happened upon this video again and better understand your question after re-watching. I should have been more clear. The points made in the article prime is talking about reflect almost exactly my mindset when I first excitedly dumped React for Svelte -- made many of the same points in various forums. However, after some time, I came to realization that I simply wasn't being as productive in SvelteKit (or the other shiny object framework for that matter) because 1) there was a relative lack of mindshare (ecosystem is more than just libs), 2) "equivalent" libs for svelte lacked stability/maturity/completeness of their react counterparts, and lots abandoned while things sort out, or 3) still several situation w/ no luck finding lib that existed for React that and found myself needing to implement from scratch (it's not all wrappers around vanilla js libs). UI frameworks was the big one for me, as I have zero interest in reinventing the wheel to get right something that provides zero additive value. I imagine time will address the issues I had (which is already 3+ mo dated), but as I said, I'm going to wait for things to sort out before reconsidering moving off React. If you've had a different experience, more power to you.
@elsehd4598
@elsehd4598 10 месяцев назад
I literally know the person (he is React "dev"), who could not use library which had react and vanilla versions with Vue, because it doesn't had Vue wrapper :/
@ir1528
@ir1528 10 месяцев назад
I'm using it in prod for a now large project. 👌 I also agree on state management. I feel like I hate them all. So much boilerplate
@ThePrimeTimeagen
@ThePrimeTimeagen 10 месяцев назад
yep
@nezinomi.asmenys5399
@nezinomi.asmenys5399 10 месяцев назад
I use Svelte for my project. love it
@lcarv20
@lcarv20 10 месяцев назад
Hear me out, since you already have css as backend, and you don’t like to write css in .css files and import it, you can now use styled-components to write your css on js files. So it would be Styled-components as a backend.
@lcarv20
@lcarv20 10 месяцев назад
Also sveltagen is a great gen.
@brokeartisan
@brokeartisan 10 месяцев назад
Man, this was a great article, god forbid the day someone compares Astro to React and Svelte, talk about obvious truly great experiences where things function as intended, that's the Astro life.
@user-cn8cj7qz2m
@user-cn8cj7qz2m 9 месяцев назад
but, i can integrated react to symfony with hash router, svelte same not hash router?
@rakebullet5200
@rakebullet5200 10 месяцев назад
Svelte rocks. Try it out and spread the word :)
@mugiwaranoadi5932
@mugiwaranoadi5932 10 месяцев назад
styled-components was the worst idea ever
@DevRel1
@DevRel1 10 месяцев назад
Svelte: Got em
@OzzyTheGiant
@OzzyTheGiant 10 месяцев назад
Thank you so much for broadcasting this! Never in my life have I felt so understood when it comes to front end dev. Everyone is preaching the React gospel when it fact this library/framework does nothing but cause so many problems for projects, from state management issues, to rendering shenanigans, to stuffing everything in JS rather than separating concerns (I don't want my CSS in JS!!), to some of the messiest components on earth all because instead of adopting OOP, people just want shortcuts, making functional components with hooks and effects that mimic class methods but now we have to worry about one way data flow. This framework doesn't make sense and needs to die! You get a like, a subscription, and advocacy!
@johanalm8105
@johanalm8105 10 месяцев назад
Svelte is amazing.
@drygordspellweaver8761
@drygordspellweaver8761 9 месяцев назад
Can we just redo the entire web in C already?
@hamzakhiar3636
@hamzakhiar3636 10 месяцев назад
8:33 ALWAYS FLEXXXINGH
@ccgarciab
@ccgarciab 10 месяцев назад
What's so bad about styling in the same file as the JavaScript?
@FilipCodes
@FilipCodes 10 месяцев назад
I love you so much Parmesan
@varoxo
@varoxo 10 месяцев назад
3:00 - 3:30 that is why I love Lit
@plachenko
@plachenko 10 месяцев назад
9:14 CSS in the backend.
@abrahamsimonramirez2933
@abrahamsimonramirez2933 3 месяца назад
The problem with React and Angular is employers pushing them as a requirement, and some vue. We need more svelte jobs or even vanilla js jobs.
@mvargasmoran
@mvargasmoran 10 месяцев назад
1:42 Not brocolli?
@IkeVictor
@IkeVictor 10 месяцев назад
i felt attacked when you was talking about state management lol
9 месяцев назад
I'm using astro with svelte and i'm falling in love with front-end development again.
@ricmorris9758
@ricmorris9758 10 месяцев назад
Htmx baby, the web is your component library:😂😂😂😂
@rohitkharche7562
@rohitkharche7562 10 месяцев назад
The main question is now how to convince higher ups to rewrite our whole existing react application with sveltekit ? If this is solved then ultimately sveltekit will win as it will gain more acceptance and use
@pocketmayo
@pocketmayo 10 месяцев назад
Next video: Why Svelte Over Rust
@MrAguaconazucar
@MrAguaconazucar 10 месяцев назад
im glad that i can add jquery to my svelte project
@bzevendetta5233
@bzevendetta5233 10 месяцев назад
Now pass state into styled components 😎
@jwoods9659
@jwoods9659 10 месяцев назад
The way React does things seem outdated now compared to these new ways of doing things
@dancarter5595
@dancarter5595 10 месяцев назад
Ok, I'll bite... Why is configuration in JSON as bad as you're making out? (assuming type definitions available)
@shubhambhattacharjee1111
@shubhambhattacharjee1111 10 месяцев назад
Even with type definition I find myself deep in the docs because some property in some deeply nested object does something that I can't understand from the type defination alone. It's always easier for me to have methods on some class or object, as they give a sense of actions, and unlike json (even with typing) can be better documented in code through jsdoc/docstring or something similar.
@PaulSpades
@PaulSpades 10 месяцев назад
First of all, what was showing on screen is not json, that's objects in literal notation - which is living breathing, modifiable code. Second, the typescript loonies 'object' to not having type definitions for every string property.
@dancarter5595
@dancarter5595 10 месяцев назад
@@PaulSpades I don't know where to start with this comment...
@dancarter5595
@dancarter5595 10 месяцев назад
@@shubhambhattacharjee1111 I'm not sure what you mean. If it's entirely typed, you can tell, particularly if those "complicated types" are commented. Please elaborate what's the better alternative, because I'm not sure what a class provides that's an improvement.
@OzzyTheGiant
@OzzyTheGiant 10 месяцев назад
@@dancarter5595 better debugging. The dev tools will provide a better stack trace because it can see what Class an object is from rather than just saying Object.
@Pengaloni
@Pengaloni 10 месяцев назад
Got 'em
Далее
Svelte 5: Introducing Runes... with Rich Harris
12:35
What Color Is Your Function | Prime Reacts
34:05
Просмотров 102 тыс.
МЯСНОЙ ЦЕХ - Страшилки Minecraft
37:24
Sprinting with More and More Money
00:29
Просмотров 32 млн
From Svelte to Go and HTMX
24:04
Просмотров 143 тыс.
CREATOR OF SVELTE From TS TO JSDoc??
19:53
Просмотров 71 тыс.
20 Must have Obsidian Plugins
9:24
Просмотров 2,4 тыс.
GPT4 Unleashed | Prime  Reacts
15:59
Просмотров 78 тыс.
How To Get Into Software | Prime Reacts
16:34
Просмотров 105 тыс.
Svelte 5 Surprised Me
6:06
Просмотров 64 тыс.
React is Holding Me Hostage!!! | Prime Reacts
28:44
Просмотров 98 тыс.
Prime Reacts: The Story of React
31:44
Просмотров 121 тыс.
Why Learn HTMX?? | Prime Reacts
21:29
Просмотров 117 тыс.
ПК с Авито за 3000р
0:58
Просмотров 1,5 млн
Мой странный компьютер 2024
18:33