News for hackers. Stuff that matters.
Re:Things I wish I knew before moving 50K lines of code to R... by megalord on Friday September 01, 2023 @04:41AM (#37348262)
[delayed]
Re:Things I wish I knew before moving 50K lines of code to R... by popcorncowboy on Friday September 01, 2023 @05:10AM (#37348439)
React is as baked in now as Java and Covid.
Re:Things I wish I knew before moving 50K lines of code to R... by kxrm on Friday September 01, 2023 @05:51AM (#37348704)
A little over 10 years ago we were saying this about jQuery. React definitely solves problems that jQuery just couldn't solve well. I know that there are issues in react we still need to address, so I know it will be a matter of time before some new way is developed that will supplant react and we will talk of react then as we talk of jQuery today.
Re:Things I wish I knew before moving 50K lines of code to R... by fidotron on Friday September 01, 2023 @08:37AM (#37350033)
And who has even heard of MooTools or the Yahoo User Interface library?

The JS ecosystem destroys the past like nothing else.

Re:Things I wish I knew before moving 50K lines of code to R... by phist_mcgee on Friday September 01, 2023 @09:10AM (#37350360)
React is orders of magnitude more embedded than jQuery ever was.

On top of that, the breadth and depth of its complexity and ecosystem and the solutions it helped build means it's really not going away in a hurry.

Updating a 2013 site from jQuery to Angular was small potatoes compared to updating a site now from react to react2.

Re:Things I wish I knew before moving 50K lines of code to R... by ttfkam on Friday September 01, 2023 @11:28AM (#37352064)
Embedded? I would have used the term "infectious".

Its complexity and ecosystem will be its Achilles Heel. There are no small number of examples of folks rewriting their React apps in weeks or even a weekend in something like Svelte. SolidJS is "close enough" in code patterns that folks will be very tempted to jump ship. Vue now has a JSX option.

But here's the kicker: frameworks like Svelte don't need wrappers around vanilla JS libraries like React has. It can use them, but it doesn't need them like React does due React's VDOM and execution model.

In 2012, jQuery and jQuery plug-ins were everywhere and necessary. YUI was dead/dying. Mootools and PrototypeJS were already quite dead. That inertia couldn't stop React despite the rewrites.

Because let's face it. We love rewriting front ends, and every rewrite erases the past. No one's gonna choose a rewrite in React if they have any notion of the alternatives.

Re:Things I wish I knew before moving 50K lines of code to R... by satvikpendem on Friday September 01, 2023 @05:54PM (#37356560)
That could've been said about Java too but it doesn't mean it doesn't stick around. Complexity is orthogonal to sticking power.
Re:Things I wish I knew before moving 50K lines of code to R... by ttfkam on Friday September 01, 2023 @07:15PM (#37357168)
On the frontend, Java was dropped fairly early on. Long before the iPhone effectively killed plugins. The backend has always been less prone to singular dominant monocultures, had far more stickiness, and greater diversity of implementation than frontend.

There are 1980s mainframes still running COBOL, especially in older, more conservative industries like banking. Those same banks have cycled their public web front ends literally dozens of times since the mid 1990s.

PHP still does A LOT of heavy lifting even if the front ends have bounced between scriptless HTML forms, PrototypeJS, Mootools, YUI, jQuery, Angular, React, etc.

It's not about programming language on the front end (unless that language is JavaScript, but that's a whole other conversation). It's the implementation of layers on top of JavaScript and the browser APIs, and those will remain rapidly shifting sand for quite some time.

Remember, jQuery had about a decade of prominence in the web dev community before the component-based frameworks were released and fairly abruptly drowned it out. That said, jQuery is still far and away the most popular JS library deployed today.

https://w3techs.com/technologies/overview/javascript_library

React isn't going away, but something else will always eventually take center stage and suck all the oxygen out of the room during new web dev planning.

Re:Things I wish I knew before moving 50K lines of code to R... by satvikpendem on Friday September 01, 2023 @07:30PM (#37357245)
Java is still widely used for Android, not to mention its usage in enterprise backends. I agree with you though, React will stick around for quite a while, just like jQuery.
Re:Things I wish I knew before moving 50K lines of code to R... by ttfkam on Friday September 01, 2023 @11:16AM (#37351919)
> we will talk of react then as we talk of jQuery today.

That it's still in active development with tons of users?

https://blog.jquery.com/2023/08/28/jquery-3-7-1-released-rel...

God, I hope not.