News for hackers. Stuff that matters.
Re:Things I wish I knew before moving 50K lines of code to R... by ytoawwhra92 on Friday September 01, 2023 @01:15AM (#37347070)
It's weird how projects like Turbolinks, intercooler, and pjax just don't get acknowledged in histories like this one.
Re:Things I wish I knew before moving 50K lines of code to R... by Scarbutt on Friday September 01, 2023 @01:16AM (#37347077)
Network effects, react is where the jobs are.
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.

Re:Things I wish I knew before moving 50K lines of code to R... by cookiengineer on Friday September 01, 2023 @06:37AM (#37348989)
> Network effects, react is where the _consultancy_ jobs are.

Fixed that for you. I think this is the real reason.

Re:Things I wish I knew before moving 50K lines of code to R... by satvikpendem on Friday September 01, 2023 @05:54PM (#37356548)
No? Most jobs that are direct W2 for a company are also in React that I've seen.
Re:Things I wish I knew before moving 50K lines of code to R... by meowtimemania on Friday September 01, 2023 @05:06AM (#37348411)
htmx has been getting tons of attention recently
Re:Things I wish I knew before moving 50K lines of code to R... by arcanemachiner on Friday September 01, 2023 @05:44AM (#37348660)
For those wondering, HTMX is the successor project to Intercooler and is made by the same developer.
Re:Things I wish I knew before moving 50K lines of code to R... by DigitalSea on Friday September 01, 2023 @08:08AM (#37349726)
HTMX is cool, but it's honestly only in the conversation because the developer has leveraged memes and garnered popularity on Twitter.
Re:Things I wish I knew before moving 50K lines of code to R... by recursivedoubts on Friday September 01, 2023 @11:19AM (#37351949)
yeah, i'm not google of facebook or ny times or whatever, i'm a lone dev in montana

what other options did i have?

Re:Things I wish I knew before moving 50K lines of code to R... by debaserab2 on Friday September 01, 2023 @11:57AM (#37352440)
People don't realize that many of the dev tools they use they are using more because of the large marketing reach of those dev tools than any objective decision to use the tool.

Entire companies have been built around the premise of good developer marketing, and if you're faang, you simply get to impose whatever developer trends you want to see in the market.

I'll never forget how wildly popular Stripe became overnight because of how easy their SDK's were - people were happy to give them a higher % of each transaction (all the stripe competitors at the time were cheaper -- this isn't true anymore, but was at the time). It always blew my mind that people were so willing to give up a % of each transaction to save an extra couple days of development.

Developers in general are notoriously susceptible to marketing trends and if you're building a dev tool that you want to gain traction you absolutely have to play that game.

Re:Things I wish I knew before moving 50K lines of code to R... by ytoawwhra92 on Saturday September 02, 2023 @09:54PM (#37367057)
Yep. Vercel has raised $300m.
Re:Things I wish I knew before moving 50K lines of code to R... by DigitalSea on Sunday September 03, 2023 @07:18PM (#37375566)
I am not saying HTMX is terrible or anything. What you've built is cool and I've built something with it. The point I was making wasn't made very well. What I meant was good options are often left out of the conversation because of React, Vue and for a while there, Svelte. There are a lot of great libraries and frameworks that nobody talks about, HTMX included. I just feel like HTMX isn't being hyped because it's good, but because of the memes/marketing aspect. I think it's a disservice to your work, which deserves to be assessed on its merits. It's a sad indictment on front-end that building something good is no longer good enough to get recognition.
Re:Things I wish I knew before moving 50K lines of code to R... by recursivedoubts on Monday September 04, 2023 @11:43AM (#37381574)
yeah, it is a little unfair

i've tried to produce a lot of technical content, arguing for htmx on its merits:

https://htmx.org/essays

https://hypermedia.systems

but the reality is that marketing is what gets people to that content. I tried for years to convince people on pure technical merit alone, and only made halting progress.

i also got very lucky that a few things all came together at once:

* the primeagen & fireship_dev both covered htmx * we released our book * the twitter algorithm changed to boost funny stuff/memes