A seat picker for a cinema in Ahvaz. The whole idea behind every framework on this page fits in fifteen lines of plain JavaScript, with nothing installed.
const Seat = (id) => `[${id}${state.taken.includes(id) ? "x" : state.chosen === id ? "*" : " "}]`function setState(next) { state = { ...state, ...next }; render(); }
Run it and choosing A4 then B3 prints the row three times, with the marker moving and B4 staying taken throughout. Two sentences describe what happened, and they are the whole subject.
A component is a function that takes state and returns markup. Seat is one, and so is the screen that calls it four times; neither holds anything or remembers anything, and given the same state either returns the same output. And setState replaces the state and re-runs the render, it does not edit the page. Nothing in that program finds the A4 seat and changes its class. It throws the description away and writes a new one.
That is the trade being made. Describing the whole screen from the current state is far easier to get right than working out which four elements to change, and it is easier because there is only one description rather than one per possible transition. What the framework adds is the part the fifteen lines skip: the seat list is recomputed from scratch and only the difference reaches the DOM, so the browser is asked to change one seat rather than redraw a row.
Where the state lives is the only architectural decision
Everything above works while there is one state object. It stops working the moment two parts of the screen need the same fact, and that is where the design happens.
The loop
What happens between a click and a seat turning
It comes back to where it started, and the returning is the point: nothing in the loop edits the screen directly.
One state object
- 01Something happens
- 02The state is replaced
- 03Every component runs again
- 04The descriptions are compared
- 05The difference reaches the page
- 01Something happensA seat is clicked, or an answer arrives from the server
- 02The state is replacedA new object, not an edit to the old one
- 03Every component runs againSeat is called four times and returns four descriptions
- 04The descriptions are comparedOnly A4 and B3 differ from last time
- 05The difference reaches the pageTwo elements change. The other two are not touched.
The fifteen line version skips the fourth stop and redraws everything, which is why it is the whole idea and not a framework.
Interactive Practice Lab
Edit and run this snippet directly in your browser (zero setup)
const items = ['plan', 'build', 'test', 'ship'];items.forEach((step, i) => console.log((i + 1) + '. ' + step.toUpperCase()));Live Big-O Complexity & Binary Search Race Lab
Compare complexity curves at scale and watch Linear vs Binary Search race live.
The rule is small and it holds in every framework here: state that two components need moves up to their nearest common parent. The seat grid and the price total both need the chosen seat, so the chosen seat belongs to the screen that contains both, not to either of them. Props go down and events go up, and that is the whole data flow: the parent hands each seat what it needs to draw itself, and a seat reports that it was clicked rather than deciding anything.
Lists need one more thing. A key tells the framework which item in a list is which between renders, so that inserting a row at the top moves the rows rather than rewriting all of them, and so that a half typed input does not end up attached to a different seat. Using the array position as the key is the commonest way to get this wrong, because the position of a row changes and its identity does not. Once the state outgrows one parent, the question becomes where shared state lives once the app grows.

Four of them, and the difference is smaller than the arguments suggest
All four take the paragraph above as given. React and Vue ship a runtime, Svelte compiles the updates away, and Angular brings the router, the forms and the HTTP client in the box rather than leaving them to be chosen.
Four layers
What a component is standing on
Each layer holds up the one above it, and the one at the bottom is the only one the browser has ever heard of.
- Your componentsFunctions of state. The only layer that knows what a seat is.yours
- The frameworkRuns them, compares the results, and decides what changedReact, Vue, Svelte, Angular
- The DOMThe tree the browser actually keeps, and the only thing that can be changedthe browser's
- HTML and CSSWhat the tree is made of, whoever wrote itthe platform
Nothing is numbered because none of it happens first. On a slow phone the bottom two layers are where the time goes, and no choice made in the top layer changes that.
So the honest way to read the choice is by what arrives with it and who is nearby to ask, rather than by the rendering strategy, which is the part the arguments are about and the part that changes least about the code you write. The four are components, state and the render cycle, templates, reactivity and a gentler entry, the full framework, with opinions included, and a compiler instead of a runtime.

What to run in 2026
Vite is the build tool underneath most of them and it is free and open source. It replaced webpack for new projects, and the difference it made was to the wait after saving a file rather than to the finished output, which is the kind of improvement that changes how people work.
Three tools
What supports a component project in 2026
Each tool replaces an older manual workaround around building, inspecting, and typing components.
- ViteBuild tool underneath most frameworks that replaced webpack for fast save feedback
- Framework extensionShows the live component tree, node state, and what triggered the last render
- TypeScriptTurns the parent-to-child prop contract into checked code instead of a comment
Components, state, and browser DOM
None of these alters the fifteen-line state model; they shorten the loop while you write and debug it.
The framework's own browser extension is the second thing to install. It shows the component tree, the state at each node and what caused the last render, and it replaced adding a print to a render function to find out how many times it ran.
TypeScript is the third and it earns itself here more than almost anywhere else, because the contract between a parent and a child is exactly what props are, and a typed prop list is that contract written down. It replaced the comment above the component saying what it expects.
The mistake: reaching for a framework before the state has a shape
The stall here is not learning the syntax. It is that people meet these as a way to build a page, and they are not that; they are a way to keep a screen in agreement with some state. A page with no state that changes gets nothing from any of them, and pays a build step, a runtime and a folder of dependencies for it.
Before installing
Should this page use a framework at all
Frameworks keep a screen in agreement with changing state, not static text.
- Yes, shared live stateUse a component frameworkJustified when multiple parts of the screen react together, like a cinema seat picker.
- Chosen seat updates both the grid and total
- State object holds real changing fields
- Write the fifteen-line state shape first
- No, empty or fixed stateWrite plain HTML and CSSSkip the build step, runtime, and dependency folder on pages like opening hours.
- State object would sit empty or hold one field
- Nothing changes on screen while reading
- Browser loads the page with no runtime cost
If every component reads from outside an empty state object, you paid for a framework to build a static page.
The cinema's booking screen is a fair case, because a seat's appearance genuinely depends on two facts that change while somebody is looking at it. Its opening hours page is not, and rendering that through a component tree buys nothing at all.
The tell that a framework is being used for the wrong thing: the state object is empty or has one field, and every component reads from somewhere else. When that happens, the fifteen lines above are the honest version, and the fifteen lines are also the thing to write first even when a framework is definitely coming, because they force the question of what the state actually is.
What none of this covers is that the page has to arrive before any of it runs, which is the half of the web the visitor never sees, and that the components are still writing the structure under every page whatever the syntax looks like. The language all four are written in, and the loop that decides when a render actually happens, is the only language a browser runs.
