Why Svelte is BETTER Than React | Prime Reacts

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I'm not a furry but my ecosystem is bigger than yours huh did you ever think about that look at the transactions rant hey look I like spelled but the ecosystem is smaller than react so that's why I'm not going to use svelt's felt kit this is the same message you might find on Reddit Twitter or even YouTube comments the same copy pasta not exactly a word by word but the idea remains it begins to become annoying and frustrating when you give people options to choose from and their only argument is smaller ecosystem and the truth that is mostly a lie svelte JS ecosystem isn't even that small compared to react yeah you are correct if you say that svelte doesn't have that many UI component libraries but even for that there are options skeleton UI flow bytes Felts felt UI Daisy UI and if you want to have more UI component libraries go make your own UI component library in sveld publish it and then wait for someone to find it and say hey this UI component library is bad I'm going to create a better one this is this is Javascript like to the T that is what I mean literally that's why if you've been building enough JavaScript if you've been doing it long enough you've built a build system in grunt you've built it in gulp you've built it in webpack you've built it in snowpack you've built something with fight and you've built something with turbo pack okay if you've been doing it enough you've done a lot of build systems and you realize hey man this is what the hell happened what what and yes I have built something in both grunt gulp webpack snowpack fight there was another one in between all those I think Warren buffering wanted to create Bud pack but I don't think I don't think it went anywhere Hey where's the building where is the building pretty funny all right State Management but let's not forget let's see but let's forget for a minute about UI component libraries and move closer to the real problem let's take let's take it bit by bit now when I'm gonna I'll say ah now when I'm going to start my react.js project what libraries do I need to import first Tailwind laughs that is a generic Library so it works on svelt oh I know State Management Library no one wants to use a use reducer so let's get a better Library uh dude by the way State Management and all these front ends is just such a whiteboard masturbation you guys y'all y'all making for these State libraries you guys need to stop you guys need to stop like 99 of these State libraries is just nuts to use in most applications your zero user simple to do MVC application does not need 40 000 lines of State Management okay I'm sorry I hate to tell you this you don't need it you could have just simply saved your single request to the global object and called it a day have a little counter have a little function have one event that fires off and but bam it could have been done I'm sorry to tell you this but you're nothing application with no users with nothing other than a simple input field does not need that in reacting yes there are so many options for State Management Redux toolkit the stand mob hacks and a lot more uh in spelled we don't have that many State Management libraries but we do have spelled store this is great by the way solid.js also has solid.js store beautiful uh a lightweight State Management API that comes built in with spell.js from the start we get a solution for Pro for a problem instead of searching for a solution that or we can use that time to build something useful Checkmate react Checkmate he also forgot like Redux and RX Redux and all the other crap that goes with it all right styling okay we solved the State Management let's move on to some styling now I want to scope my styling to a component so that we can keep it uh up backed with the components we write react has a solution for this CSS modules uh but we are cool and hype and we want to have some have The Styling in the same files as the rjsx to solve this we need to choose a library from the list of CSS njs libraries let's see our options styled component CSS modules emotion jss more like emotional drama uh with spell JS we get it directly built Let's see we get this directly built into the framework style block get correct by the way there has never been more emotional damage in my lifetime than styled components can we all agree that JavaScript plus JS or css at the same time is literally just the path to hell it is so effing awful it is so awful and and everyone always goes like this oh but I didn't I do this and oh it's gonna be great and you know what every single time you do it you go oh this is going to be a great time this is exactly what I wanted I just wanted to create a couple styles on my component and then you do it and it seems great then you start adding one you're like this kind of is a little bit weird and then the next thing you know you've actually crossed from purgatory right into Dante's Inferno and you're like how the hell did I get here transitions I want to have some really cool transition from my dream startup page let's see our options in react.js react transition group react motion react move dot dot dot first felt we don't need a library because the framework comes with the transition API right from the start you probably start to see a pattern here spell JS it doesn't have that many libraries because most of the problems are solved by the framework itself oh man I also love that they're just finally giving up the game with spelled and be like it's a framework react is like I am a library okay I am a library you just you just don't want to use the library or without a meta framework and and technically the library will dictate everything your code has to write and your server and it I mean it's an exceptionally leaky abstraction to the point where everything you write becomes react I mean it's come on it's simple it's it's a library it's not a frame it's a library no you're not just stop stop just call a spade a spade get over it okay uh uh but maybe what I said before is a half truth our app needs more than State management style libraries UI components transition libraries maybe we want some custom Library well let's see how hard it is to use some random library inside it's spell JS compared to uh react AG grid I have chosen AG grid as the first example the example on the readme looks like this placeholder right here blah blah blah blah blah okay import grid great great great great uh C configuration okay I'm starting to lose emotional confidence here blah blah blah blah blah by the way this is terrible abstraction I just want to throw this out here right away the moment you start trading code for Json I'm just telling you don't do this okay I'm telling you every time this happens you will eventually regret your decision when Json when you configure okay configuration is almost always a huge pain in the ass yeah yaml engineer okay uh e-grid development selector my grid migrate grid options and our implementation is felt isn't that different from the one in the readme okay we do this yep we do all this grid element we uh do all this band to Bam Bam Bam okay sounds good we are following the example almost bit by bit and we just added a way to create a grid object when grid element reference is obtained in a way to manage the state reactively and we didn't need a react wrapper on top of the base library to make things work hey by the way nice styling I like how your style goes off here but this style stops right here got up dude you know grid is always grid is always easy until it just is a huge pain in the ass can we all just agree that Grid's great until Grid's not great can we all agree I always think grit's gonna solve all my problems and then I just use grid and I go why why did I spend like 40 minutes yes grid is just table but with slightly better things all my homies hatred dude I you know then you use flex flexbox instead and then there comes a point where you go I hate this too why is my life always hey just filled with hate oh it's because it's front end development front end development's hard just accept it uh and it's not hard for hard reasons it's hard for odd reasons like reasons you wouldn't expect reasons such as this like this is this is just odd right this is just an odd problem we're looking at right and this is just it's just one of the many problems oh skill issue yeah I just don't wanna I just don't I just don't want to be a CSS engineer Real Talk uh okay we got data tables what about some charts you'll need charts in react you're probably going to want to use reacts charts JS V2 dude watch out because charge JS if you use V4 you better have esm enabled because if you don't have esm stuff and you use charts four you're gonna have this whole broken build system invite it's gonna all all over the place and everything's gonna suck your life away no you don't need to wrap a rapper and spell you just need to use it as a library all right chart from Auto blah blah blah blah HTML canvas here's some data points here's this whole blood of the blah blah blah let's go all right uh you see it isn't exactly hard to use the library as it is oh we just need to take into account the reactive model so we can destroy and recreate the chart object when our data set has changed and even that isn't hard to understand no you no use State no use effect no use memo I know someone that always called it use memo I always giggled on the inside uh conclusion I could probably write a book just about comparing react wrappers to simple library usages and spell this is actually a really good point which people constantly Overlook when you do use react you'll find yourself writing these rappers around libraries like everything you use isn't just the library itself there's the react glue because you need the react glue to make it even remotely performant because it will just like I reread no like crazy and it becomes like impossible I'm just sure that most of the points presented could be easily owned by someone smarter than me but the truth is that with react you don't just uh you don't learn to use the underlying Library you learn to use the wrapper love that statement we keep writing wrappers for things that already exist then go on Twitter and make memes about how many JS libraries appear per minute who is this person I love you whoever you are we are we are we are kin okay we we are somehow related to each other then we make more reactions rappers that use other react.js rappers and then in the end we have a Jenga Tower where just one brick needs to fall for everything to collapse this is this is great this is actually a great article the name is this feltagen
Info
Channel: ThePrimeTime
Views: 167,616
Rating: undefined out of 5
Keywords: programming, computer, software, software engineer, software engineering, program, development, developing, developer, developers, web design, web developer, web development, programmer humor, humor, memes, software memes, engineer, engineering, Regex, regexs, regexes, netflix, vscode, vscode engineer, vscode plugins, Lenovo, customer service
Id: bh-e700IlmQ
Channel Id: undefined
Length: 11min 28sec (688 seconds)
Published: Thu Jul 13 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.