You don't need React: creating a minimal UI library in Vanilla JavaScript

A blog post proposing a tiny vanilla JavaScript UI library as an alternative to React reignites debate over when heavyweight frameworks are justified. Commenters question the author’s use of “immediate mode” on top of the DOM and highlight challenges like state management, DOM performance, and edge cases that full frameworks solve, while others praise the exercise as educational and note the library’s very small size. More broadly, people argue over whether most web apps genuinely need React-style tooling versus simpler HTML/CSS/JS or lighter options like Preact or Astro, especially in an era where AI can generate much of the boilerplate.

Overall reaction to the mini UI library

  • Some find the project educational and like that it shows how little JS can power a full site.
  • Others think the example code (e.g., tic-tac-toe) proves why React or similar frameworks are valuable.
  • A few readers explicitly say they’re happy to see experiments and alternatives, even if incomplete.

React vs “you don’t need React”

  • Many argue React is overused, especially for simple, content-heavy sites or basic interactivity.
  • Others counter that if you’re going to need React-like features eventually, you may as well start with React (or Preact/Vue/Svelte/etc.).
  • Some see mini frameworks as missing the main problems React solves: state management, diffing, scheduling, and complex DOM updates.

Immediate mode vs retained mode

  • Several commenters say the article misuses “immediate mode”; DOM-based rendering is inherently retained mode.
  • There’s debate over whether React is “immediate mode on top of the DOM,” but consensus in the thread leans to “no, it’s retained.”
  • Some note that pretending the DOM is immediate-mode leads to issues like lost input state.

Performance, size, and complexity

  • The library is praised for being very small (~2–3 kB), with overall pages around ~60 kB JS.
  • Counterpoint: Preact is already tiny, so size alone doesn’t justify a custom library.
  • Multiple commenters stress that trivial pub/sub or “re-render everything” approaches don’t scale; modern frameworks invest heavily in fine-grained reactivity and DOM scheduling.

Use cases: simple sites vs complex apps

  • Many argue most sites could be plain HTML/CSS or server-rendered with light JS; SPAs and React are overkill for typical CRUD or blogs.
  • Others working on complex, highly interactive apps (e.g., huge forms, offline mode, accessibility) say frameworks like React materially improve maintainability and team productivity.

AI/LLMs, DX, and ecosystem

  • Some claim framework choice matters less in the “AI era” because LLMs can generate and refactor code, even replatforming later.
  • Others push back: framework design, performance, and SDK ecosystems (e.g., headless CMSes favoring React/Next) still strongly influence real-world choices.