Now that the dust has settled, what do we think of React?Is it a good way to make a web app without turning it to spaghetti or is it just slop that ends up sending 15MB JS bundles to your users?
>>107009164Good library for it's time, shitty ecosystem and now there are more clean solutions albeit not that popular
>>107009164Base react is stupid and useless in the modern day. Next.js is not that bad but I don't have much experience with it. I'd rather use svelte.
>>107009173>and now there are more clean solutions albeit not that popularSuch as?I'm not into webshit but a friend vouches for Vue.
>>107009182>Such as?I like solidjs>but a friend vouches for VueIs fine, most of these frontend libs are kinda converging to the same features and concepts that power them. The difference is mostly if you like markup in JS or JS in markup
>>107009164desu I tried remaking my website in react years ago and it turned out even more spaguetti filled than the original code, but uglier and slower, I hated it so much that I just went back to the original
>>107009164I fucking hate it.Vue is a lot better. Much less niggerlicious.
I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT I HATE REACT.USELESS JAVASHIT FRAMEWORK PERMANENTLY RUINED EVERYTHING.EVERY APPLICATION EVERY WEBSITE IN EXISTENCE USES 800GB OF RAM NOW.FUCK ALL OF YOU.
>>107009277samealso I hate hooksand redux.
>>107009289At my job they tasked me with writing a proof of concept web app for an API. I don't usually do frontend but I did a lot of HTML/CSS/JS projects in high school, so I wrote it in vanilla ES6.It was great. But then the retarded upper management made it a hard requirement that it HAD to be written in React and hired a bunch of retarded React devs. Now it fucking SUCKS. It's slow as SHIT and I HATE it.
>>107009392It's funny because the initial pitch of react was that it would make your app faster, because you could move from page to page without reloading. But in the real world, all react apps ended up being bloated balls of crap.
>>107009164vdom was good for its time before we had signals figured out
>>107009429can't I just use jquery .on?
>>107009439Maybe? Probably? Depends on your project and amount of interactivity in it
>>107009164I'm not sure if it counts, but I don't mind Next.js.Having server side components to speed things up, and only having certain components on the page be client side is a nice touch. It's still bloated as shit though.
>>107009439no, jquery doesn't help you at all for managing state
>>107009496just add some global vars in the mix
>>107009508Ragebait or indian
>>107009516pragmatic white programmer has joined the arena
>>107009173REACT is a framework not a library.
FUCK REACTFUCK NPMFUCK LARAVEL
i still remember when react was the cool new thing...where the fuck did time go?
>>10701045810 years went by.. maybe you played a VN or two?
>>107009164it just werks
>>107009164I still don't understand why people use this convoluted dumpster fire cancer. Are most web devs seriously brain damaged and retarded or something? This goes for all modern javascript front end frameworks
they added view transitions and a compilerhttps://react.dev/reference/react/addTransitionType#customize-animations-using-browser-view-transition-typeshttps://react.dev/learn/react-compiler
>>107011378try to build something more complex than hello world and you will understand
Hooks are an abomination. Class components were fine I guess. Haven't look at it in a while and don't care enough about the new additions.
>>107011409What's wrong with hooks?
>>107011407I have built an ecommerce site that lets you preview clothes using 3D models, you can also generate designs that get applied to the models in real time. I have also made an image editor and now I'm almost done making an online competitive multiplayer game.I still don't get it. I did it all in vanilla js and it was super easy, the only library I used was three.js.
>>107011464There are many articles out there complaining about hooks, so I'm not going to nitpick every little thing. I think most criticism though boils down to how most hooks cross cut across the boundaries that the old lifecycle methods set up. Lifecycle methods were just a bespoke RAII implementation. Do some work before you mount, do some cleanup work when you unmount. It was pretty straightforward, unless you had literally never encountered it before (which I suppose was the bulk of most frontend """engineers""" at the time). But then they introduced useEffect. One function that handle fucking everything, with a laundry list of caveats. Just this month Cloudflare took itself down because of one useEffect.My real biggest pet peeve is retards thinking that because you literally use a function as the component, suddenly you're doing "functional" programming. Hooks literally hook out to the framework itself, which means no component that uses them pure at all. I feel like a huge driving factor in the initial hype cycle was just because of that and how trendy FP was when they were introduced.
>>107009164Use Nuxt with Vue. It's cleaner /// raw html with a fucking jQuery. No one gonna visiting yer zero-user website anyway.
>>107009890next.js is a frameworkCRA does not even exist anymore, react is a much of a library as can be
>>107011579I remember a big thing at the time was it would avoid a lot of boilerplate as a selling point. That and binding, although people did it for performance reasons more than scope. Now people just chuck in anonymous function to onclick anyway
>>107009164At my job my colleague made a super simple little tooltip component for react: >500 lines of code, 4 files across 3 foldersFuck react
just use Vue to show this motherfuckers at Meta
>>107011633No it's not, It imposes you a workflow it's not something you can import or <script src="..."> in your code, retard.
I am currently building a web app just with vanilla JS and web components and am having a blast. fuck react
>>107009164Never used this meme garbage
>>107012157I just use a massive switch in the backend and front end. With HTML templates. It's many times faster
>>107012157those aren't replacements.you are going to re-invent react badly for state management.
>>107011633next.js is not a replacement for cra.cra replacements are vite and others:https://react.dev/learn/build-a-react-app-from-scratch
>>107012057it's weird to be so confident and factually wrong at the same timejust check the wikipedia page I don't know
>>107009164Its a great way of separating the state of your frontend from the DOM, you gotta remember all that "data binding" and MVC style shit was still all the rage when react was coming into fruition.
>>107012216jsx needs a build step. writing react without jsx is not idiomatic.
>>107012216>The insistence that it's a "library" is a historical artifact from when it was new and wanted to seem less imposing than monolithic frameworks like Angular. It was a marketing and philosophical stance: "We're just a view library, use us however you want!">But today, that's bullshit. React is the foundation of a massive, opinionated, and complete framework for building user interfaces. Anyone who argues otherwise is prioritizing a semantic label from 2013 over the concrete reality of development in 2024.
>>107009164It's chonky, sucks and has a lot of unexpected footguns if you're coming from jQuery/vanilla JS (stale closure bullshit, useEffecf traps etc.). Also they just keep adding new features fixing the problems they created for themselves.There are better choices nowadays that are very nice to work with. Only benefit of React (also its drawback) is it's the most popular.>>107009200This guy gets it.+1 for Solid from me
>>107009164React is 17% larger than jquery, but covers more use cases, because jquery is just utility functions. Both are below 100kB. So those 17kB max more, that react gets you, will be compensated by having to write less to accomplish the same in the rest of the code.React is an objective improvement. Webshitters producing huge blobs is an issue independent of react.4chanX is the most bloated piece of javascript i ever saw in my life, and it uses none of those things.
>>107009164React 18 was good.Hook based, functional components, built-in way to import svg/media files, lazy imports, life was good.Then react 19 came in with their 3 parts "use" hook, with their form hooks that now automatically updates an "updating/uploading" state
>>107012299>stale closure bullshit, useEffecf traps etcWelcome to UI development. The same exists in proper libraries for proper applications like GTK or Qt or whatever Windows is doing. They all have states that they watch changes over with events and loops and if you do expensive code every single time the render loop comes around, you will have a bad time.
>>107012299solid is getting rather defensive at the prospect of react adding signals and being faster than solid
>>107012254well you can't simultaneously want a library that you import with <script src="..."> and expect templating featuresnot that needing a build step automatically makes it a framework since it still lacks essential stuff like routingalso you wrote REACT in upper case so you're indian and you wipe your ass with your bare hands, kindly stick to CORE JAVA sir
>>107012343react added memoization and a compiler to mitigate that
>>107012351Not convinced:That's only *IF* the compiler ends up being as good as it's claimed to be and only *IF* the signals benchmarks (which aren't even React...) they dreamed up during that conference can be believed. And even IF it catches up - Solid's still substantially easier to write (closer to vanilla), has a more thought-out standard library (router, createResource, etc.) and the bundles are much, much MUCH smaller.
>>107012343Sir we're discussing webshit. My point was this is somehow not a problem in Vanilla and in other frameworks like Solid and Svelte.But thanks for the introduction
Only reason to use react is because of react widgets.
>>107009164Fuck React.
>>107012335I don't care about those changes, but i do care about the larger bundle size.There was some stripped-down-react fork somewhere, i don't remember how it's called, i might check this out again.I think if they would just strip old stuff from react, it could be much better. I don't need backwards compatibility. If i want an old version, i use that old version. I am on react 18, because why would i update?
>>107012707>i don't remember how it's called, i might check this out againpretty sure you mean preact
>>107012687dat my boi Even You aka Vyo
only nocoders, script kiddies and vibe coders use libraries like react
>>107012713>preact>We stand with Ukraine. Show your support >BlueSkyI will put it further down the priority list. React 18 will do for now.
>>107012752literally me frfr.i'm a website coder with tons of dev experience on building landing pages and whose biggest challenge is finding the right 'hero banner'.
>>107012812Hohols are cheap labor of course should support them
>reactGo kys tranny. I’m using vuejs and it’s superior
>>107012888>t. unemployed
>>107012687vue lost but vite woni wonder how did he feel about that
>>107012973No, React only won in America; Vue is more popular in Asia because Americans don't value quality.