[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: 1757167824898679.jpg (6 KB, 306x165)
6 KB
6 KB JPG
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?
>>
>>107009164
Good library for it's time, shitty ecosystem and now there are more clean solutions albeit not that popular
>>
>>107009164
Base 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 popular
Such as?
I'm not into webshit but a friend vouches for Vue.
>>
>>107009182
>Such as?
I like solidjs
>but a friend vouches for Vue
Is 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
>>
>>107009164
desu 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
>>
>>107009164
I fucking hate it.
Vue is a lot better. Much less niggerlicious.
>>
File: 1740367381040760.jpg (57 KB, 720x885)
57 KB
57 KB JPG
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.
>>
>>107009277
same
also I hate hooks
and redux.
>>
>>107009289
At 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.
>>
>>107009392
It'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.
>>
File: .jpg (186 KB, 1976x1232)
186 KB
186 KB JPG
>>107009164
vdom was good for its time before we had signals figured out
>>
>>107009429
can't I just use jquery .on?
>>
>>107009439
Maybe? Probably? Depends on your project and amount of interactivity in it
>>
>>107009164
I'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.
>>
>>107009439
no, jquery doesn't help you at all for managing state
>>
>>107009496
just add some global vars in the mix
>>
>>107009508
Ragebait or indian
>>
>>107009516
pragmatic white programmer has joined the arena
>>
>>107009173
REACT is a framework not a library.
>>
FUCK REACT
FUCK NPM
FUCK LARAVEL
>>
File: 1751433935765801.jpg (883 KB, 4096x2840)
883 KB
883 KB JPG
i still remember when react was the cool new thing...where the fuck did time go?
>>
>>107010458
10 years went by.. maybe you played a VN or two?
>>
>>107009164
it just werks
>>
File: processed_1691054623 (1).png (770 KB, 1024x1024)
770 KB
770 KB PNG
>>107009164
I 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 compiler
https://react.dev/reference/react/addTransitionType#customize-animations-using-browser-view-transition-types
https://react.dev/learn/react-compiler
>>
>>107011378
try 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.
>>
>>107011409
What's wrong with hooks?
>>
File: download (17).png (578 KB, 1024x1024)
578 KB
578 KB PNG
>>107011407
I 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.
>>
>>107011464
There 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.
>>
>>107009164
Use Nuxt with Vue. It's cleaner /// raw html with a fucking jQuery. No one gonna visiting yer zero-user website anyway.
>>
>>107009890
next.js is a framework
CRA does not even exist anymore, react is a much of a library as can be
>>
>>107011579
I 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
>>
>>107009164
At my job my colleague made a super simple little tooltip component for react: >500 lines of code, 4 files across 3 folders
Fuck react
>>
just use Vue to show this motherfuckers at Meta
>>
>>107011633
No 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
>>
>>107009164
Never used this meme garbage
>>
>>107012157
I just use a massive switch in the backend and front end. With HTML templates. It's many times faster
>>
>>107012157
those aren't replacements.
you are going to re-invent react badly for state management.
>>
>>107011633
next.js is not a replacement for cra.

cra replacements are vite and others:
https://react.dev/learn/build-a-react-app-from-scratch
>>
>>107012057
it's weird to be so confident and factually wrong at the same time
just check the wikipedia page I don't know
>>
>>107009164
Its 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.
>>
>>107012216
jsx 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.
>>
>>107009164
It'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.
>>107009200
This guy gets it.
+1 for Solid from me
>>
>>107009164
React 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.
>>
>>107009164
React 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 etc
Welcome 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.
>>
File: .png (92 KB, 1178x354)
92 KB
92 KB PNG
>>107012299
solid is getting rather defensive at the prospect of react adding signals and being faster than solid
>>
>>107012254
well you can't simultaneously want a library that you import with <script src="..."> and expect templating features
not that needing a build step automatically makes it a framework since it still lacks essential stuff like routing
also 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
>>
>>107012343
react added memoization and a compiler to mitigate that
>>
>>107012351
Not 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.
>>
>>107012343
Sir 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.
>>
File: you.jpg (69 KB, 500x500)
69 KB
69 KB JPG
>>107009164
Fuck React.
>>
>>107012335
I 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 again
pretty sure you mean preact
>>
>>107012687
dat my boi Even You aka Vyo
>>
only nocoders, script kiddies and vibe coders use libraries like react
>>
File: 1737419922157.png (81 KB, 233x216)
81 KB
81 KB PNG
>>107012713
>preact
>We stand with Ukraine. Show your support
>BlueSky
I will put it further down the priority list. React 18 will do for now.
>>
File: 1733018849868579.webm (2.93 MB, 640x480)
2.93 MB
2.93 MB WEBM
>>107012752
literally 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'.
>>
>>107012812
Hohols are cheap labor of course should support them
>>
>react
Go kys tranny. I’m using vuejs and it’s superior
>>
>>107012888
>t. unemployed
>>
>>107012687
vue lost but vite won
i wonder how did he feel about that
>>
>>107012973
No, React only won in America; Vue is more popular in Asia because Americans don't value quality.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.