←back to thread

7 points Farer | 6 comments | | HN request time: 0s | source | bottom

What do you think about developing a web front-end with Vanilla JavaScript to minimize performance issues?

I believe I have reached a certain level of success. The canvas seems to have excellent performance. Could you take a look at the ongoing test and provide feedback?

https://alpha.breathingworld.com/

Show context
satvikpendem ◴[] No.41912981[source]
I think at the very least, TypeScript should be used.
replies(1): >>41913571 #
Farer ◴[] No.41913571[source]
Of course, type safety is great, I understand that. But I want to know the detailed reason why. Why do you think it's so important?
replies(1): >>41913644 #
solardev ◴[] No.41913644[source]
It's a developer experience thing. Moves many bugs from runtime to coding time, letting you catch them preemptively and fix them right in the IDE without going through build cycles or hot reloads. You instantly know if something will break because of mismatched types.

Probably doesn't matter much for performance. It all gets stripped away during build anyway.

replies(1): >>41913858 #
Farer ◴[] No.41913858[source]
I've worked with various frameworks and libraries in the past, like Prototype, jQuery, AngularJS, React, and Next.js, but I think I've ultimately come to trust Vanilla JavaScript the most. Compared to developing with Vanilla, I noticed that using these tools often results in unnecessary code in the final product.

As a side note, I was never really fond of jQuery, even when it first came out, and it ended up becoming almost obsolete. Lately, I'm also not entirely happy with the direction React and Next.js are heading. It could just be because I've grown so accustomed to Vanilla JavaScript.

replies(2): >>41914832 #>>41914852 #
satvikpendem ◴[] No.41914832{3}[source]
Those frameworks are unrelated to TypeScript, as you can use TypeScript as a preprocessor for vanilla JS DOM operations.
replies(1): >>41915189 #
1. Farer ◴[] No.41915189{4}[source]
Okay. I think what I said might cause some misunderstandings. As I mentioned in another comment above, it seems to be because I don't like adding builds, compiles, issues, etc. that are not pure JavaScript. I also like TypeScript. It ensures stable development, right? There probably isn't anyone around you developing with vanilla JavaScript, is there?
replies(1): >>41918478 #
2. satvikpendem ◴[] No.41918478[source]
Why would there be? Everyone I know has migrated to TypeScript.
replies(2): >>41920749 #>>41920845 #
3. Farer ◴[] No.41920749[source]
Not a single exception? :)
replies(1): >>41948170 #
4. Farer ◴[] No.41920845[source]
And are you using React and Next.js these days?
replies(1): >>41948175 #
5. satvikpendem ◴[] No.41948170{3}[source]
Honestly, no, I haven't heard of anyone in my circle still using JS without TypeScript.
6. satvikpendem ◴[] No.41948175{3}[source]
I am but more so because I like them, there is no need to use them with TypeScript.