Is it time to move on?
Вставка
- Опубліковано 11 вер 2024
- 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 🙏
We're not even post PHP and JQuery how tf are we supposed to be post-React??
Leave PHP alone. It can complement any SPA just fine.
PHP is good now apparently
@@Jhkratos It has pretty good features, especially if you add in packages for data validation and ORM. You also don't need async syntax.
@@Jhkratos has been since 7.4
@@GeneraluStelaru well you dont need async because php isnt an async lang
React devs need 10 years more to finally decide which lib they should use to make a http request
And another 5 to download the bulk their build produced =)
It’s problem of another devs. I settled on axios
I thought axios is a cross-framework standard nowadays?
ky is the way
@@v-lado angular has its own http client from very start. With interceptors and other stuff
Can we focus on a post-CommonJS world first
this
Actually this. Like, let's solve the friggin' primitives first.
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
Well said.
- Use Deno/Bun instead of Node
- Use JSR instead of NPM
That should be enough
Considering there's people still debating whether they should migrate from JS to TS, I'm gonna say no, it's not that time just yet.
Hot take, but I don't always need build step for what *.d.ts and jsdoc can mostly replicate
@@user-yc4cp7ue2w With latest/next version of Node, it seems I won't either 👍
I just use JS now. TS ruined a lot of the benefits in using JS and offered little to no value. It's good for noob devs though.
@@_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.
Any minute now..
is it time to create a New js freamwork?
Every day is a good day to create a new js framework!!
Rust Frameworks > JS Frameworks
Maybe they could name it next js! /s
@@xxtuddlexxnextjs?
@@xxtuddlexx Tomorrow.js
I moved to Vue after a Redux tutorial in 2015..
⚰️⚰️⚰️
And there's still a new state library everyday, lol. people love to over tinker. *tinker tinker tinker*
never felt happier
@@shanekunz There are far more people saying there's a new library coming out every day than there are new libraries coming out every year.
@@Gigusx people are welcome to build and publish as many projects as they want, it's just funny how useless the projects are.
based on the job market and the number of greenfield projects still being built with React in big tech and F500 companies, im going to say no..
Millions of flies can't be wrong
@@RezetRoymillions of flies pay me money, idc
I'm working with Vue now and don't miss "rendered more times than expected" not by a bit.
Render time argument was never a real thing
@@RezetRoy I agree, this is why I referenced a problem that happens with hooks/useEffect and can be a pain in the ass to debug in certain environments
@@softultraviolence5673 hook is crap
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.
React 19?
I like Preact. You can write code like Solid OR React, even in the same component
@@shenzo- Look up "I tried React Compiler today, and guess what... ".
React is broken at the core and there's nothing they can do to fix it.
Solid is such a joy to use
All should move on to jQuery and the world would be healed
The fact is most web site still using jQuery 😂
I'm still writing my code using jquery 🙂
fr, jquery is actually goated
"Things like web components are almost always terrible"
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.
what about SSR with dem? the first thing that's required now
Lit should be wayyy more popular
@@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.
We still use jQuery 👍🏽
ye
Same
Legend
We still use Fortran
Heck yeah! You know you were onto something when a crucial part of your creation becomes part of the builtin functionality.
PHP:
*laughs in php*
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.
We still haven't moved to react and you are talking about moving on from it 😅
Umm, Solid Start does, it gives you way more control with (imo) better ergonomics around data paths
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.....
SolidJS so much better to work with than working with React/NextJs
If I could change the most used framework with one snap, I'd change it to Svelte, fast, easy to learn, no bullshit
Solidjs even way less bullshit
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.
@@IStMl Switching is generally hard, a lot of sunk cost. Can always make a case to build a new codebase in it though.
@@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
I love React with all my heart but I see a very clear lock in with Vercel coming up in a near future and the concerns me A LOT
At this point it would feel like leaving your wife you know (with goods and bads) for a random girl just because she's younger.
if it's a toxic relationship yes
Going back to JQuery is like getting back with your ex.
Bruh the drama ya'll with which ya'll talk about tech libs....smh
@@QuebnQ the first love lol
@@SXsoft99 every relationship has its ups and downs. So will the one you leave for
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
feel like i have watched this video before. like a week ago. Did you reupload?
That MVC punchline hit me hard. I grew up on Yii and jQuery. It was my heart and soul for years and I am STILL transistioning...
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.
Looks at article title:
I think we all know where to move to...
Modern C++!
@@smallbluemachineYep. That's a nickname that people gave to Rust! Great to see that you also agree. We keep winning 🦀
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
You know how I know it’s time to move on? Enterprise companies are barely starting to use it.
You’ve just lied
@@nogovi2686 nope, I've interviewed at some recent enterprise companies and they are all exploring a slow migration towards integrating react
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).
what lang?
@@LeFlamel Progress OpenEdge ABL with an HTML frontend.
@@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.
@baconmanthelegendthat’s like saying painting and drawing are two completely different things.
@@mattmurphy7030 i mean they are kinda
@baconmanthelegend you never made a career change? Are you like 14?
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.
What should be added exactly?
@@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
My front-end is just static.
Congratulations!
No logic - no problems
Peace in our time
HTMX vibe
@baconmanthelegend W roast
Btw svelte runes are very different to react hooks...
Its the same as Solid Signals, but react dont have anything quite like that
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.
+1 for Preact!
Phoenix Liveview is pretty awesome. I’m just saying. ;) Amazing engineering productivity, and delightful to work with.
react js was a revolutionary tool.
so was the combustion engine.
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...?
Send me link, I'll read it myself.
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.
Webassembly isn’t meant for GUI though. The frameworks that do user it still need a bridge to JS for DOM update etc. With that come many negatives
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.
Oh yeah let me write a UI in Rust hahahaha
So stupid
Dioxus?? Full stack rust framework
@@smallbluemachine Without the DOM there is no a11y built in and many other features that make life easier for your users.
Wait I just started learning this !
Checkout astro instead :)
Keep going bro
Thousands of companies use react, and will do so for many more years
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.
Came here to move on from React, ended up learning how cool react is. : (
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?
hearing that jsx was a later add-on to react kinda blows my mind - what were yall doing before??
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.
Why do I always get onto stuff when it's just about to go away?
it's not. it's just youtube and twitter. they don't reflect the reality.
It's his job to keep talking about new stuff , react is still industry standard
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
I just heard the name "Chedeau"
Legendary guy, obviously.
But yeah, I respect Anthony Fu
The mandatory "we accuse you of shilling in the comments"
"go learn COBOL" 🤦♂ like bruh, look at the job listings, ain't no one getting that fresh out the oven
React: it’s just one way data flow
Also React: from client to server to client to hooks to store to component
Also puts markup, logic, direct refs to css classes in one file 😢
Yes, SolidJS ftw
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.
Is it time to move on?
oh boy, NO!
yes
Yes, use svelte
King is dead
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 👍
Whatever happened to the JS community's infamously mercurial commitment to the framework of the week? I feel like something's missing.
Wow, you managed to render HTML in the browser. That's really impressive. Color me amazed!
i love how everyone is trying to redefine the front end but the best front end i've ever seen is the fan site for cavestory that was created in 2008
In angular you can use observables with async pipes
nice vid theo. i enjoy the code examples and hearing your thoughts.
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
Y'all come back to ExpressJS... we know you're weary and tired of the rat race. (MVC is still King)
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.
what was the payload size for the example?
Anything which you can send through the network, can be passed as props from server to client component as well
18:07 does the client code sent after the promise is resolved, how does this work ?
he has another video on this exact topic. basically, the slow component gets "streamed" in.
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.
I really wonder which crazy framework they're going to invent this time
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…
It’s time to move on to SolidJS
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.
It did someone who never heard of separation of concerns.
Totally stupid idea which were sell as a revolutionary vision
@@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.
C - too old
javascript - too old
Never yet named quantum computing native language which will be invented in the future - perfection
I feel like the only person who doesn't have an issue with react.
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.
13:30 - 19:50 should be a standalone mini video. 12/10, play with React more!
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
Solidjs brought me back
I think SvelteKit streaming promises are just as easy if not easier than suspense.
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
Picture writing an static website with JSX, isn't it more ergonomic?
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.
I admire Theos ability to debate that shit is legendary
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
VanillaJS. Here we go!
Video link is not in description 😢
I love JSX tag since it's indicate UI / Component.
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
omg, I didn't realize it or knew it before we could do promise there. I'm new here
hey everyone, lets move on to htmX!
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 ....
Probably not if you dont work alone
Oh hey Gopher 😊
PHP and jQuery is still king like it was ten years ago. And I never regretted skipping so many "cool" JS Frameworks.