Hacker News new | ask | show | jobs
by villgax 39 days ago
Relying on React or Typscript in LLM era seems very stupid, just have the LLM setup whatever dom manipulation you want and have it write decent JS without slop. Far more offline compatible development almost negligible supply chain issues as well. At least ones you can control.
9 comments

Layout design issues are orthogonal to choice of language and framework. You can apply the article's approach to plain static pages and to SPAs.

I tend to work closer to the latter end and find that both React and Typescript are extremely helpful to make my code extensible and maintainable. YMMV.

We strayed away from god after jQuery
This makes no sense. LLMs and agents benefit from (good) abstraction as much as humans do.
Sure, just doesn't have to be npm or build dependent IMO
LLM agents are also very capable of using npm and build systems, and also get the same benefits from them as humans do. For very very simple things (again, just like for humans), it may be viable. But in anything non-trivial I would be horrified with a codebase that was just LLM-spaghetti-DOM-manipulation.
This works great for small sites/apps, but really starts to fall apart if/when it gains complexity where React starts to make sense. I've tried a few times to "just use plain javascript" with the LLM and initial results are often much better, but if the site grows a bit too complex, the LLM starts making a lot of mistakes and it can be hard to reason about as a human and get it on the right track. That hasn't been the case with the React apps IME.
React maybe (because there are alternatives).

But for mid/large projects, I find that TypeScript brings sanity to JavaScript.

I love some quick and dirty JS project. But after a certain project size I begin the see runtime errors like undefined, NaN, 'false/true' concatedted to URLs, and so on. TypeScript eliminates a ton of those.

What a strange take. LLMs produce plausibly correct output, which is exactly where plain JavaScript and DOM manipulation will result in a spaghetti mess.

Frameworks like React that add structure to the data flow, component encapsulation, and a huge repertoire of patterns to train on, plus Typescript for immediate compile-time feedback loops… those are what LLMs thrive on.

I agree, specially for simple apps. it's much easier to upgrade if you are not relying on 3rd party or NPM's. Don't have to worry about code injections.

I have these two https://reddit.premii.com and https://hn.premii.com/ both works without any changes. Reddit will stop working once they kill the apis but until then it will work.

Why write in rust if LLM can write assembler for any architecture?
That's what another HN post a few days away was saying too lol but about Python
I hope I never have to work with you.
get back to API calling whip noises
> just have the LLM setup whatever dom manipulation you want and have it write decent JS without slop.

Hmm, yes, simply have the LLM write good with no mistakes.