Answer
React 18 does not give each overlapping transition its own priority. Updates wrapped in startTransition are placed in the same Transition lane. When transitions are triggered in rapid succession, React coalesces them into that lane and the latest state wins at commit time. The isPending flag is set when startTransition is invoked and cleared after the transition commits. It signals scheduling intent, not that the main thread is blocked.
If a high-priority update such as a keystroke or click arrives while a transition render is in progress, React yields. Partial render work that has not committed is discarded and the transition is re-rendered later from the latest state rather than resumed. Once React enters the commit phase, a render is generally completed rather than discarded; DOM mutations are not rolled back by a later urgent update, though passive effects may still be deferred.
Confirmed facts
- Transitions share a Transition lane. Rapid successive calls do not queue separate pending states; only the final state is rendered.
- High-priority updates preempt Transition lane work. Uncommitted work is abandoned and restarted from the newest state.
- Commit is a point of no return for that render. After commit, the update is visible and is not undone by a new urgent update.
- There is no public API to abort a transition or guarantee an interrupt point.
useTransition is not a cancellable promise.
Likely explanation
The exact moment React decides to yield and discard partial work is a scheduler heuristic based on time-slicing and lane priority, not a documented public contract. Component tree cost and the frequency of incoming high-priority updates change when a yield occurs. Because the heuristic is internal, the balance between using transitions for large data sets and perceived immediacy must be validated in your app.
Steps for this case
- Keep high-priority inputs outside
startTransition and heavy state updates inside it.
- Use
isPending only for UI affordance, not as a measure of main-thread block.
- Verify behavior with React DevTools Profiler: record an interaction and check whether transition renders are marked as interrupted and restarted.
- Test typing latency with a controlled input outside the transition and a large list rendered inside the transition.
One diagnostic detail that changes the recommendation: which React major version you are targeting. React 19 adjusts scheduling and effect timing compared with React 18, so verification should be repeated on the exact version in use.