[Beginner] · The four responsibilities, and the constraint that makes this different from every other kind of software.

A frontend is a program that runs on hardware you don’t own, on a network you don’t control, for a user who will not read your error message.

Every difficulty in this domain follows from that sentence.

The four responsibilities

1. Render state as something a human can perceive. Take data and produce pixels, text, and structure a screen reader can navigate.

2. Capture intent. Turn taps, clicks, keystrokes and gestures into meaningful operations.

3. Talk to the backend. Fetch, mutate, handle latency and failure, and keep a local view of remote state that is always slightly out of date → state and data.

4. Stay responsive while doing all of it. A frozen interface is a broken one, regardless of correctness.

The constraint that defines the domain

You control the code. You control nothing else.

BackendFrontend
HardwareYou chose itA five-year-old Android on 3G
Runtime versionYou pinned itWhatever browser they have
NetworkDatacentre-localLossy, high-latency, sometimes absent
ConcurrencyYou set the limitsOne main thread, shared with rendering
FailureRetry, log, alertA human is watching
Code visibilityPrivateEvery byte is readable

Two consequences that beginners consistently underestimate:

The client is untrusted, by definition. Validation in the browser is a usability feature — instant feedback — and never a security control. Anyone can open dev tools, edit the request, or skip your UI entirely with curl. Every check that matters must exist on the server → never trust the client.

Nothing is in your secrets. An API key in frontend code is public, whatever your bundler did to it. NEXT_PUBLIC_ and VITE_ prefixes are warnings, not protections → config and secrets.

One thread does everything

The single most important mechanical fact about browsers.

JavaScript execution, layout, paint and user input all share one main thread. A 300 ms synchronous loop doesn’t just delay your function — it freezes scrolling, blocks clicks, and stops animation.

Which is why:

  • Long tasks are the main cause of a page that “feels slow” despite loading fast
  • Anything heavy belongs in a Web Worker or on the server
  • async doesn’t create parallelism — it yields the thread during waits → the event loop

The 16 ms budget applies here too. At 60 Hz, everything the browser must do between frames has to fit in ~16 ms — the same constraint as game development, with less control over the machine.

The platform is the framework

Underneath React, Vue, Svelte and everything else is the same platform, and the platform is the part that doesn’t churn:

  • HTML — structure and semantics. Not a formatting language; the tags carry meaning that accessibility tooling depends on
  • CSS — presentation, the cascade, layout → styling
  • JavaScript — behaviour
  • The DOM — the live tree the browser renders, which your code mutates
  • Browser APIs — fetch, storage, history, observers, workers, media

Frameworks are strategies for keeping the DOM in sync with your state. That’s genuinely all they are, and knowing it makes learning the next one much faster → rendering.

The practical advice: invest in the platform, not the framework. Frameworks have a half-life of a few years; fetch, the cascade, event handling and the DOM do not.

Where the difficulty actually is

Not in the syntax. The hard parts, roughly in order:

State. Keeping a local copy of remote data correct while it changes underneath you → 03.

Asynchrony. Everything worth doing is async, and races, out-of-order responses and stale closures follow.

Layout across unknown viewports. From a 320 px phone to an ultrawide monitor, with text the user may have scaled to 200%.

Accessibility. Which is a correctness requirement, not a nicety, and frequently a legal one → 05.

Performance on hardware you’d never choose. Your laptop is the least representative device you own.

Source: [reference] — written Aug 2026.

↑ Back to 01 — Foundations