A video player can look finished and still have nowhere to go when the stream stalls, the video is removed, or a viewer hits an age gate. Those screens are easy to imagine once somebody names them. Until then, they rarely make it into an estimate.
That’s what I keep coming back to in Guillermo Rauch’s 2015 essay Pure UI. Rendering the interface from its state makes it possible for designers and developers to put all those screens on a shared map.
In an imperative UI, event handlers describe how an application leaves one screen and arrives at another: a spinner appears while a request is in flight and the button disappears; when the request completes, the button returns; if the request fails, an error is appended and then eventually removed. Event handlers on buttons and other controls change the screen a step at a time, so its behavior and appearance depend on the sequence in which the handlers run.
Rauch's key insight is that rendering can describe the resulting state without specifying each DOM change needed to reach it: a pure function that takes a state and returns the screen that corresponds to it, then is called again whenever the state changes.
Describing how the UI should work as a series of screens was already intuitive to designers. Creating artboards for desktops, tablets, and phones is analogous to calling the same pure function with different inputs. Instead of a collection of screens, a style guide like GitHub's Primer describes components with parameters, like passing a class to get its variant. React gave developers a model designers had long been using.
What has aged best
Rauch’s video player also needed a screen for a video still converting, a connection error, and a viewer hovering over the progress bar. The player looked like one artboard. By the time he counted the states, it was a small project.
Rauch writes that an incomplete state space leads to poor estimates. You can't estimate the work of implementing states nobody has identified. Better arithmetic cannot correct an estimate whose scope omits the error path, the stalled stream, or the age gate.
For a remedy that would help with estimates, Rauch proposed breaking an interface into small functions, giving a complete list of what each accepts as input, and rendering all combinations that are worth showing. The list of states becomes a negotiated deliverable between designers and developers. If a designer lists twenty states and we render ten, the ten missing states are visible. That does not mean half the work remains: some states are much harder to implement than others.
Component workshops give this practice a home by showing variants of a component together. Tools like Figma introduced variants and properties to allow designers to build all states into a single component. Visual regression suites compare the states a team has chosen to capture. These tools make a state map easier to maintain; they do not make it complete.
Where purity leaked
The function stayed pure, but the context around it did not. With jQuery, you only see a payment form's failure path if you force the payment to fail. A pure render can show the form in its success and failure states at the same time. But the pure function only describes the on-screen frame. The hard work is not in the screens but the actions between them: requests that time out after retries, responses that arrive after a form has already been submitted, and double submissions.
A pure function can render a “network error,” but it can't describe how the application got there or how to get out again. The state map is a roster of the rooms, not the hallways where the bugs live. For a decade, data-fetching libraries, effect systems, and server components have tried to bring the hallways under the same discipline as the rooms.
This is also where the argument about estimates gets harder. Listing states is tractable, but listing sequences of states is combinatorial. A team that shows all twenty checkout screens could still have a bug that only happens after a certain sequence of four steps. The state map describes what a screen can look like, but it needs a complement that explores the ways users get there.
What the map is for today
Property-based and model-based testing can exercise the transitions between those screens. A harness generates sequences of actions, checks a property after each step, and can reduce a failing sequence to a smaller reproducer. A checkout test might submit, time out, retry, and receive the original response late, then check that only one order exists. All the individual screens could look correct while that sequence creates a duplicate order.
The harness can expose states missing from the designer's list, but it has limits of its own. It only explores the actions and inputs its generators can produce, and only detects violations its checks express. Hypothesis's guidance on choosing an input domain makes this constraint explicit: restricting the generated inputs can exclude the values that trigger a bug. The state map and the test model both need review.
There's another reason the state map is important. A growing share of interface code starts as a prompt to an AI model. A prompt like “build a video player” generates a single screen. The same prompt with a list of states like “converting,” “removed,” “age gate,” and “error” comes closer to the product. The list gives an agent or a developer concrete cases to implement and review. Adding the allowed transitions and invariants makes it more useful still: what happens if playback stalls, and what must remain true when the user retries?
The legacy of Pure UI
Pure UI has become known for advocating a programming model. I think it was advocating a practice: before you start to build a new interface, list every state it can be in and keep that list visible for everyone. React made that practice practical, and that practice made the work easier to estimate, review, and share.
Before you call the video player finished, point to what the viewer sees when playback stalls. Then show what happens when they press Retry.