# With AI, you barely need a frontend framework

# With AI, you barely need a frontend framework

**Author:** dlants (dlants.me)
**Date:** April 9, 2026
**Source:** https://dlants.me/vamp.html
**Repo:** https://github.com/dlants/vamp

## Summary

Argues that AI-assisted development changes the calculus for frontend architecture. Instead of React/Vue/Svelte, a lightweight vanilla-TypeScript pattern — "vamp" — is sufficient because LLMs pattern-match repetition reliably and the pattern is deliberately explicit, local, and predictable.

## The View pattern

```typescript
interface View<State, Message> {
  container: HTMLElement;
  sync(state: State): void;
  destroy(): void;
}
```

Each view manages its own DOM and state bindings. Application cycle: DOM event → dispatch → update mutates state → view.sync syncs DOM.

## Key components

- **Templates & bindings**: Views render initial HTML using template strings with `sanitize` for XSS. `Binder` tracks state-to-DOM sync via `bindText`, `bindAttr`, `bindClass`, `bindVisible`.
- **Composition**: `bindChild` for static children, `bindSlot` for conditional mount/unmount, `bindList` for arrays with key-based reconciliation.
- **Unique refs**: `ref()` generates unique IDs to prevent selector collisions between parent/child views.
- **CSS-in-JS**: `cls()` and `mountStyle()` generate unique class names without build tooling.

## Why this works with AI

- Prioritizes explicitness, locality, predictability over conciseness
- Repetitive patterns → AI can pattern-match and produce new views reliably
- No implicit re-renders, no hook ordering, no dependency arrays, no VDOM diffing
- Each view is self-contained → LLM reads one, understands the pattern, produces the next

## React criticisms (appendix)

- Reconciliation: conditional branches remount components, losing focus/input state
- Hook complexity: dependency arrays are fragile chains; hook position must be deterministic
- Async rendering: Fiber/concurrent rendering introduces tearing, timing issues, measurement bugs
- Performance: VDOM diffing requires manual optimization (shouldUpdate, Immer)
