TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Going from React to Vanilla JavaScript

43 pointsby alexbezhanalmost 2 years ago

18 comments

surrTurralmost 2 years ago
I love vanilla TS (with some micro libraries). However, this article is crap. It's just statements without any examples. How did using vanilla JS improve your app? Is it just performance? What does the project structure look like? Which tips/tricks do you have for vanilla JS? I haven't learned anything new from this article, why does it get upvoted?
nnessalmost 2 years ago
The author has missed a critical insight from their evaluation — the fact that they could develop a tool in vanilla JS more simply than React is only because they first developed it in React. Developing with a framework gives you the advantage over bespoke tooling — you can experiment and iterate faster. It is only having had that experience, and exploring the problem-domain so clearly by building it once, does the second build happen to quickly.<p>So yes, maybe React was over-engineered for their problem. But I think they only realised they over-engineered their problem after having over-engineered their problem...<p>A better point would be &quot;I used React to test-build an app then to build it again natively for speed.&quot;<p>--<p>As an aside, I do agree that React (and I&#x27;m extrapolating this to many of the web frameworks) have an incredibly steep learning-curve and onboarding cost. I&#x27;m an avid Vue fan and I&#x27;ve found the architecture around Vue 3&#x27;s &quot;single-page components&quot; to have created so much technical debt and complexity that I spend more time debugging the build pipeline then actually developing. I still like the flexibility and acceleration I get with Vue, but Vite often leaves me feeling like I&#x27;m just fighting the framework... I guess I just miss Gulp.
duxupalmost 2 years ago
There is virtually nothing in this article.<p>I can only assume we’ve adopted the Reddit pattern of upvoting sentiment at this point.
评论 #36644737 未加载
3oH2y869almost 2 years ago
I&#x27;m a VP of Engineering and have been a TL at major React shops.<p>I don&#x27;t agree with this statement: &quot;The best benefit to all of this, in my opinion, is that it allows more junior-level people build interfaces that they wouldn’t otherwise be able to build at all. I say, React has commoditized the web app development.&quot;<p>In my experience, React is pretty complicated for junior engineers who don&#x27;t grok how the actual runtime works. On the other hand, what React has really enabled is for large frontend teams to exist and work together meaningfully. I remember the days of vanilla JS and large codebases. I can imagine that today those codebases would be easier to maintain and work on due to things we&#x27;ve learned and developed (thanks to React, by the way), but I still strongly believe that the productivity gains from React for a team greater than like, 2 front end people on a project that needs to be maintained for longer than 6 months is worth the effort.
harshawalmost 2 years ago
As someone who got out of the web dev game before reaact, I feel like everyone using react has led to most of the web sites (and mobile apps) feeling slow. My judgy view is that when you see apps that appear to be single page but take noticeable time to load their content - that&#x27;s react. And as someone who built a spreadsheet app in.. say 2006, you have to go native to get good performance. But I base my observations on no real data :)
评论 #36645295 未加载
评论 #36644684 未加载
Xeoncrossalmost 2 years ago
Removing millions of lines of code does speed up your application. Removing react and the 100 NPM modules helps. Removing Java and the 100 Jar files helps. Removing Django&#x2F;Laravel&#x2F;Rails&#x2F;etc... helps reduce calculations and memory.<p>There are a lot of instruction abstraction layers that just aren&#x27;t needed. Older games are a great example. I am still amazed at the size of the modern StarCraft, Rollercoaster Tycoon, or CS:GO executables with all the new layers of emulation and compatibility stuff. Sometimes even 10x the original size.<p>However, there are ways to use libraries like react (preact.js anyone?) without a dozen plugins and a huge runtime layer. Look at HTMLX, the new cool kid that was originally an XHR request that inserts document.querySelector(name).innerHTML = response and is now a large package of 145KB of JavaScript.<p>Part of the issue is the growth of these frameworks and part is that the developers don&#x27;t know how to use them in performant ways. They&#x27;re just trying to ship stuff, performance is optional.
smallerfishalmost 2 years ago
Not a great article. The big thing is JSX; it&#x27;s so much more pleasant than building UIs with the document&#x2F;element api.
评论 #36644635 未加载
评论 #36644674 未加载
评论 #36644648 未加载
donatjalmost 2 years ago
I felt like I had just finished the introduction and the article was over. I wish this had gone a lot further into depth.
joeldoalmost 2 years ago
How has this article landed on the frontpage? There is 0 substance - are people even reading it before upvoting?
评论 #36644698 未加载
aydioalmost 2 years ago
I was excited to see the author&#x27;s reasoning and some code to support the claim. Then I reached the end of the page.
bastawhizalmost 2 years ago
&gt; But building complex apps is easier, compared to React.<p>This is distinctly the opposite of my experience. Being able to reuse common components makes logic encapsulated. The browser sort of has this with custom elements, but that adds its own level of complexity.<p>React, despite everyone&#x27;s best efforts with CRA and other tools, is hard to get up and running with. It just takes time, and you inevitably need to eject. But once you codebase gets big, idiomatic React (at least in every case I&#x27;ve worked with) is much easier to scale than rolling your own everything.
raincolealmost 2 years ago
Then show the app? Not the screenshot of the app. The app itself.
progxalmost 2 years ago
I will never understand why so many use unnecessary complex things, especially if better and simpler things existed befor and after.
revskillalmost 2 years ago
OK, but at what cost ? How much time investment ? How much experience is required ?<p>Is this article written by a marketer ?
Vanitalmost 2 years ago
I just don&#x27;t see how to do this without half-assing a framework and then it&#x27;s not really Vanilla anymore is it?
Ylmazalmost 2 years ago
A lot of people don&#x27;t know how to use react. The author is one of them.
评论 #36644663 未加载
2halmost 2 years ago
Not a single code example. Crap article.
KnobbleMcKneesalmost 2 years ago
To denigrate so much of modern web technologies in the name of performance, and then use Typescript, over which you have no fine grained control of the performance of the transpiled code, is absolutely laughable.
评论 #36644652 未加载
评论 #36644701 未加载
评论 #36644610 未加载
评论 #36644758 未加载