Live data from Hacker News

Going from React to Vanilla JavaScript

alexbezhan.substack.com

11–20 of 36 posts

Re: Going from React to Vanilla JavaScript

#15

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.

Very little typescript changes your code in a way that would be meaningful for performance. I think enums are one case. It's not like it changes your loops or adds object copies or anything like that

Re: Going from React to Vanilla JavaScript

#16
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?

Re: Going from React to Vanilla JavaScript

#17
post #11

A lot of people don't know how to use react. The author is one of them.

Author here. I've used React Table for this, which has like 20k+ stars on Github. It's slow. Imagine you want to edit a cell in a spreadsheet with 40k rows. You MUST create a new array, otherwise React won't update the DOM.

Re: Going from React to Vanilla JavaScript

#18
> But building complex apps is easier, compared to React.

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.

React, despite everyone'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've worked with) is much easier to scale than rolling your own everything.

Re: Going from React to Vanilla JavaScript

#20

Not a great article. The big thing is JSX; it's so much more pleasant than building UIs with the document/element api.

> ...building UIs with the document/element api.

When the whole premise is flawed, JSX or not, does it really matter if there is a better or worse way of misusing a technology not meant for UIs?

Leave HTML and JavaScript to Wikipedia and other hypertext document libraries.

Unfortunately, WASM is not there yet, but people are trying: https://platform.uno.

Post reply on HN