React has had a great decade. But is it time to move on? Are we in a post-React world? ARTICLE LINK thenewstack.io... Check out my Twitch, Twitter, Discord more at t3.gg S/O Ph4se0n3 for the awesome edit 🙏
It's infuriating how 90% of popular libraries are still CJS. you can literally use scripts to convert bruh theres literally no reason to use it anymore
@@_nom_ it's true, I have never faced any problems related to types in plain js...though it's quite handy to use ts because it suggests you the keys in a object, the parameters needed to be passed to a function and what type of data the function will return (and probably some other handy features I can't remember), other than that it's very annoying.
Wait for you to have to hunt down a state reference somewhere in some mysterious place, mutated by some random indian contractor change that breaks half of your app and have no way to find it besides untangling the spaggetti. And of course the timing issued causing components to break if you alter the way you load a particular state fragment Grass is not greener on the other side, both frameworks are cool and suck equally
So, what if your user is on a spotty connection, and the Suspense ends up failing. How do you put a retry button in front of them that they can use to refetch that one Suspense without reloading all the rest?
YES! THIS! Germany's mobile data network is spotty like that, especially if you go by train - which I have to do often, as I am blind and can not drive a car. So sometimes those goddamn webapps just hang forever X.x
The example of passing a Promise into the ClientExample component is actually a horrible feature. It's not just mixing code and UI. It also mixes delayed async rendering with the UI. It really makes the UI = f(state) a big lie. That's nothing functional about it, when the result of f(state) is an ever shifting unknown mess.
I have never regret I migrated my project over to SolidJS. It has resulted in much cleaner and simpler code (no useCallback, useMemo) and less need for complex state management while gaining significant performance improvements. But still, it provides the JSX syntax React developers are used to.
100%. people that hate on web components just want them to be react components and dont understand that they arent. they potentially can be though. also wait until all the astro server islands folks figure out that web components and astro server islands are like the exact same. "an empty element that loads a reactive component sometime later when js is requested, received and parsed" is literally where the js that defines is is in lol
@@michaelwarren829 yep. next year or so, someone will take one of the many obvious patterns that you can build around webcomponents, sprinkle a bit of css/js around it and act like they just reinvented all of web development.
@@c7rsed118 If you want your web components to be SSR'd, you can just make them SSR'd and have them update on the client only when they need to. Web components are just html/css/js.
Im not using react (Vue in my work and Svelte for private projects) but Bashing on react is just stupid, reacts push for better UI Code is the only reason we can choose between these framworks now. I don't know what the "better" framework is, but right now it reminds me a lot at the times jquery was suddenly hated although it has made our lives easier for a decade and pushed JS to integrate better standards like querySelctor etc.
in short, React may not be the only game in town, but it's still a super valuable skill to learn, and beginners shouldn't be discouraged from learning it. ❤ However, it's also super important to keep your eyes & ears open and be aware of the alternatives of the changing landscape. 👀
Solid is probably one of the best options that's not particularly popular. I have to use react for work but all my side projects are solid or svelte and they both have better DX imo and are definitely more performant.
Comment re 17:00: It is not so *** cool Theo. It is so much less elegant that Blazor's mixed mode. Spend some time out of the Next.js ecosystem. EDIT: Theo states "Nothing has this level of composability" but that is just wrong Theo.
I`m sorry, but i`m gonna skip your video this time, and no, not because of the click-bait thumbnails you keep using but because i read that article first... and it was the biggest click-bait (not title, but the whole press article) that i`ve read in a while.... It's like i`m genuinely annoyed and enraged at that article.... It's just gives you a small history of the react, that it has some problems(like every other tech in this world) that it has its supporters and haters (like every other thing in this world), a very brief "there are others too, you know ?" and in the end it blatantly slams you with "Oh well you know it's to early to ask if we're in a post react front-end landscape". And that is it... besides "there are others who don't use VDOM", there's nothing else, no "why are these better, faster, stronger, " arguments, no new tech, right now behind the corner, not even an "AI is gonna do it all" ramble.... What a ducking waste of time that was.....
Solid doesn't require you to relearn a whole new framework. It's React without the bs. You're never gonna convince a whole team/company to switch to Svelte. Solid however? Just show them how similar the code is.
@@Gigusx Svelte also requires to learn an entirely new way of building web apps. Solid code is so similar that refactoring files can mostly be done by GPT, and requires little work
oh passing a promise is a new thing ? sveltekit had it from v1 you just return a promise from a server load FN and let svelte handle it with it await block
for everything that resembles a standard browser app, angular. propper oop style framework. typescript non negotiable. and html is pure html. makes so much more sense. for everything else, vanilla js.
Svelte is what you'd expect the next evolution for HTML rendered content for responsive design would be. It's like, "here's HTML, but like, responsive." That's what I like about it the most for the front end, but yeah, once you get used to using hooks and state in React, it's really not that bad and very composable. Now, if only React developers learned to actually use semantic tags and Fragments instead of just everywhere because that kills accessibility
Only React people could have ever believed that 'frontend development' was tied to React. I've never used it and have no intention of ever using it, and i'm in charge of a rather large point of sale that I've been developing for the company since 2009. Really, JS frameworks have just come full circle to PHP, and I'm more than happy to continue with the MVC pattern. (My system is not built in PHP either, it's built in a language that pretty much nobody here will have ever heard of).
@@ray73864 It's hilariously bad, just made of marketing hype and the shattered dreams of orphans. In general, languages which attempt to be English-like are always terrible. The company standardizing on that means their management is VERY gullible.
i dont wanna be that guy but you can can pass promise props and await inside svelte markup with much simpler syntax ``` export let promiseProp; {#await promiseProp} Loading... {:then data} Data: {data} {:catch error} Error: {error.message} {/await} ```
Was looking for this comment. SveltKit has streaming - passing promises around from server to client. ... also, sisn't react.learn come after the infamous Svelte tutorial?
Runes aren't really analogous to hooks, either. So the idea that hooks influenced runes seems like nonsense (assuming this is what they mean by reusable logic). You can use runes in a similar fashion to hooks (but you could also use stores as well, if not a little bit verbose), but they're a lot more than just "svelte hooks". The closing thesis that "React is relevant because it's still leading ideas" seems to be based on ignorance of other frameworks.
The reason I never use large frameworks because the only thing you're leaning is that framework for the most part. If you coded that same example with AJAX with maybe some some small helper libraries you're leaning skill set transfer and will last you 20 years.
Yes it's time to move on... from web dev. Moving to embedded systems. It's so wholesome to write software that will run for decades, and not become obsolete every 5 years when a new framework comes out.
HTMX actually does the whole waiting thing you did. You can even poll an endpoint and all and with a very few lines and not all of that yapping And yes, Suspense is actually insane for webapps, specially when using React Three Fiber (which I learned for a shwaty but she didn't appreciate it)
I'm more interested in a post-typescript environment tbh. back in 2015 everyone was pushing js forward with custom babel plugins. Then typescript came along and unified everything into a single (semi)-statically typed language and refused to innovate since. afaik the only new syntax we've gotten since those times is the using keyword, and clearly that's because Microsoft controls Typescript so they can just shoehorn it in there. Typescript is great but it really should be a community controlled project with a rich plugin API to add custom features, as it stands now it's holding us back.
@@mattmurphy7030 Well they definitely should ditch experimentalDecorators and implement the new proposal. it's stage 3 and effectively done. then just like they did for experimentalDecorators they should add support for the more experimental proposals under feature flags. namely: - pipeline operator - pattern matching - do expressions and as already mentioned have a plugin system so new proposals could come with their own implementations instead of needing to be added directly to ts. you really don't want a central body to have authority over which features get proper LSP support and which ones do not.
@@mattmurphy7030 another example of why we need this: people have been saying they want "throws" annotation support in typescript for years now, but Microsoft doesn't want to add it. The only way you could implement this right now is by completely forking typescript and going through the hassle of somehow getting editors to use your modified language server for .ts files instead of the vanilla typescript one. if typescript just had a plugin/compiler hooks system we could just implement this feature we want as a plugin and use it that way. And if it gets popular it might get merged into typescript officially. But none of that innovation can happen with the way typescript is currently governed.
Can you please make a video about web components and why they’re bad? I‘m currently the only react developer in a company and I originally started there because I thought they wanted to switch from angular to react. But now a bunch of back end developers are pushing web components as an alternative for react which is insane to me…
It's insane that we haven't evolved to the point where vanilla js/html/css is good enough.. That we still need these "total conversion" mods to make a sensible front-end on the web..
Yes, my goodness please yes. At the very least switch to SolidJS without a decade of cruft and tech debt. React is so far removed from standard JS that it's unfun to use
Totally agree, I knew it would have a comment saying about Solid, is just the right way of how it should work. Its insane to still use react even knowing that solid is the react that is better than react, what what react seemed to be in the beggining... Simple, solid and fun
React would be fine if it weren't for the broken reactivity coming from a decade of bragging that it's "just a library bro". Look at Preact or Solid. They give you the same ergonomics without all the rendering garbage from React. It awesome a decade ago and it definitely inspired many libraries and frameworks but at this point we should really move on.
Finished watching the whole video. If React has done me any harm then it is making my slow as fuck internet out in the boonies even slower with gigantic bundle sizes - and my friends and their accessibility problems (screen reader, braille display) became MUCH worse. Just as an example, people abuse as an alternative to basically everywhere. Plus, the ultra depth of some of those pages actually leads to screenreaders talking gibberish at some point or...just nothing at all instead. xD Discord, frequently breaks and it was written with this kind of framework... so, while I get the idea of composability and stuff, I do wonder if this has made people either lazy, or so busy with their build tools and other fuzz that they forgot to build an actually usable UI...?
If you pass in a promise to the client can it leak credentials if the promise is an api request with some api key in it, or does it just stream the response and the actual promise is executed on the server?
Web dev has been an absolute ghetto. Web Assembly was gifted to you and all that happened was the radio and rims got ripped off and gang tags were sprayed down the side. Sad.
That’s just the PTSD talking. -The DOM is THE hack. WA let’s you display whatever you want with whatever language and UI framework you want, with a REST API of your choosing, like an ordinary, sane human would want to when programming a computer.
Just keep learning it. I use Vue now but started with react. Frameworks have alot in common anyways. In the end its just a matter of preference and what framework gets the job done fastest. In most cases the framework you know is the one that gets the job done fastest.
I want to watch the stop using new technologies video, but it is nowhere to be found... not when searching, not when browsing through your channel... please link it?
I dislike Suspense. It doesn't makes sense to disconnect your loading UI from the content, and we cannot handle UI transitions which is just awful. NextJS streaming features are cool technically, but the fact that we need to prop-drill again is bad DX. What I really want is have Next stream requests from the server, but populate SWR/useQuery cache, so I don't need to have a direct prop-chain from the lowest page component or convolute things with contexts.
Wow that little sample of code is really neat I think everyone who is nervous about these things should just walk through the steps you just did to understand how that work cuz you just explain something that I was struggling with months ago. That I fixed in a very similar fashion but I didn't understand why it was working because I was missing a couple pieces which you just demonstrated and I don't know how to articulate it
STAAAHHHPP. Just a friendly reminder if someone comments the video without looking it doesn't count as a view. And Firefox automatically blocks autoplaying videos.
I have been learning frontend for a few weeks now and have been trying to decide between frameworks. I landed on React the other day and this helped me to solidify that choice 👍
19:04 yes it's cool but under the hood it just make an http request the server and act accordingly, i'm quite satisfied with only react + suspense At the end of the day it's just react with sprinkles inside, I don't want to add another layer of complexity to an already complex system
It's time for new web protocols and to move beyond HTML and JS as the engines. We've been stuck here for over 30 years, and I've been programming for 40. That's a long time to be beating the same dead horse.
Suspense renders a fallback placeholder while the component becomes ready. Once the component is ready and the client receives it, it gets displayed. That's basically what you see on sides like outlook where it shows gray shiny boxes before your emails show up, or loading spinners on twitter.
Can’t agree more with Theo here. My experience with people that claim these things, is that they’ve never actually built and maintained a big frontend. I started developing frontend professionally in 2013, so I’ve experienced the whole controversial introduction of React among things like Angular. I’ve done a lot of different things in my 11 year journey as a software engineer, but there has been one constant all this time, and that is React. Big companies I’ve worked for are, to this day, still migrating apps to React. I’ve seen teams experiment with things like Vue and Svelte, but the projects almost always ended up being migrated back to React. So no, the React era is far from over…
This totally glosses over the biggest React complaint I have. JSX. It's a straight up terrible invention. It's a completely unnecessary abstraction on top of HTML that makes it difficult to use with other technology, adds unneeded complexity, causes syntax confusion, and really provides no benefits. If you remove JSX from React, React is nearly perfect, and so many people wouldn't have felt the need to build other JS UI libs. I can understand why someone might build JSX as part of an early tech demo, but to ship with it?! I can't believe someone didn't step back and simplify it, it almost feels like a Facebook/Meta conspiracy.
@@RezetRoy Vertical slices are better for reading and easier to understand the context when maintaining. Separating the layers of same concern into a different places just adds indirection and accidental complexity.
i worked 1 year react, 1 year vue, currently in vue. but i really love one way binding and jsx with ts. for personal project i use react with vite, zustand and mui.
React made me not want to do web dev anymore lol svelte brought that back for a bit but I haven't touched any html/js in months. Might use svelte for a front end in my next project if I get tired of tui's
Having a component based approach let's the browser cache it better. I believe a subset of JSX could work as a seamless replacement, and is an opportunity to drop the legacy support and make the CSS reset the default
The funny thing is, people always say "but use vue, you can have two way data binding" and like, yeah, that's why I love React, you read top downs and things happen from top to bottom, I don't want two way bindings and have to look back and forth. Don't get me wrong I get why people like writing less code, or have more expressive code but react is just... too good lol And it keeps getting better, it's not like it's the same framework over 10 years. From JSX being option, to object components, to class components, to functions, to hooks, to server components, signals and like, the framework will keep getting better, and like, not really harder to understand, if anything it's getting easier.
React just getting started, and enterprise companies are starting to update their jquery code base to "new tech". Nothing better out there to move to and considering the share amount of projects written in react the last decade, React will never disappear, same as PHP
He makes it sound like React is the only innovator in the space and always ahead because of those innovations. Is that really always the case? As far as I know React Hooks and Signals (the thing Svelte Runes are based on) are not exactly the same. I find it much more realistic that small frameworks experiment with new concepts and React often just adopts the surviving ones. I'm not that deep into the lore, but from the outside it sounds like hype trains shouting at each other
Old things are great? Please point me to the DOS apps I can work on, something about working on some old retro stuff sounds fun, and I still can't flush out of my brain all the various INT 21 and INT 10 calls I memorized 30 years ago :/ Same goes for anyone who wants some windows 3.11 apps, I can write the heck outta some win16 code ....