Product1 publisher3 min readPublished
Solid 2.0 lets a component ask the data whether it is pending
A walkthrough at brenelz.com shows Solid 2.0's isPending reading pending state off a memo or an expression, while the React version of the same screen splits into two components and reports on the transition.
The Product Desk · Product desk

What happened
- Solid 2.0 adds isPending. It takes a function that reads reactive state, either an accessor or an expression, and reports whether that expression depends on an in-flight change.
- In the React version of the same screen shown in the walkthrough, the work splits across a parent holding useState and useTransition and a child that calls use() on a promise inside a Suspense boundary.
- Solid's createOptimisticStore derives its value from the API call itself, so getMessages() supplies the server truth and optimistic changes are written on top as mutations such as m.push(message).
- Solid's action is written as a generator so its runner can restore context after a yield, where React currently needs another startTransition to mark state updates made after an await.
- The walkthrough names six small touches in Solid 2.0, and works through the first two before breaking off mid-sentence in the optimistic-updates section.
Compiled by The Product DeskSomething wrong?How this is made
Why it matters
- capability A component can put the spinner next to the value that is actually waiting, without a parent threading a transition flag down to the child that owns the data.
- decision A team weighing the 2.0 upgrade can price two of the six additions against its existing code; the remaining four come with no code yet.
- cost Generator-based actions are a new authoring habit for application developers, and the teams that adopt them pay for it in code review before they save anything.
- constraint The pitch is about how the framework feels, so an engineer asking a manager for upgrade time is arguing feel, without a measured retention, time-to-value or bundle figure to bring.
The spinner beside a user's name is the small version of this problem. Someone clicks, an id changes, a fetch goes out, and the component has to work out which part of the screen is now stale. The Solid example prints isPending(user) and isPending(id) next to each other. The component can ask whether the user is pending, or whether the write to id is still waiting on downstream async work [12].
The React version in the same post answers a different question. Its flag comes from useTransition in the parent, and the value itself arrives in a child through use(getUserPromise(id)) under a Suspense boundary [8]. "Notice we can't really ask if the user is pending," the author wrote [1].
The import counts are the wrong place to look for the saving. Both snippets pull four framework APIs, createSignal, createMemo, isPending and Loading on one side, Suspense, use, useState and useTransition on the other. The React file adds an import from a data module and a second function component [1].
On the optimistic side, the wiring that moves is the fetch. React's useOptimistic also takes an existing value as its source of truth, but it does not manage the API call that produced that value. Fetching and refreshing are connected by hand, and the initial data arrives from a parent as initialMessages [5]. In the Solid version the store owns that call. When the action finishes, the optimistic layer is removed and refreshed server data becomes authoritative; if that data reconciles to values already displayed, Solid can avoid further DOM updates [4]. Expressing the change as m.push(message) also lets the store track the write granularly and update the parts of the UI that depend on what changed [11]. Across the two optimistic snippets, React's addMessage nests startTransition twice and Solid's action uses it zero times [2].
The claim the post makes for the whole set is about feel. "Individually, they might seem small. Together, they make a real difference in how the framework feels to use," the author wrote [2]. The text measures nothing, and the case rests on the two worked examples. Derived state you can override, choosing where each value is computed, server reads as function calls and a runtime that explains itself are list entries in the material available [9][10].
A team on Solid 1.x can price this from its own repo. Count the booleans that exist only to report that a request is in flight, then count how many of those get read next to a value they do not actually track. The second number is what isPending replaces. If it is small, two worked examples do not pay for a major-version upgrade.
What to watch
- Whether worked code appears for the four touches the post only names, starting with overridable derived state and per-value computation placement.
- Whether the SolidJS project ships a migration guide mapping Solid 1.x patterns onto isPending and createOptimisticStore.
- Reports from teams that replaced hand-rolled pending helpers with isPending in production, with before-and-after component counts.