Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

React 19 useTransition: Two Async Bugs That Can Look Like One

React 19’s useTransition has a documented post-await limitation, while out-of-order requests create a separate stale-results problem. Here’s how to tell them apart.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

useTransition can keep an update non-blocking and expose whether its Action is pending, but it does not automatically mark every state update after an await as a Transition—and it does not prevent overlapping requests from finishing out of order. Those are two separate failure modes that can produce confusing UI. React documents the first as a limitation; the second requires application-level stale-result handling. A React 19 issue also reports a stuck pending flag in one specific Suspense reproduction, but the available record does not establish that it is the same “second bug.”

What useTransition promises—and what it does not

useTransition returns an isPending flag and a startTransition function. The function marks state updates as non-blocking Transitions; the flag stays true while the Action is pending and until its final state is shown. See the current useTransition reference.

That contract is useful, but it is not a general async request manager. Two distinct questions matter when debugging: did React mark the state update as a Transition, and did the application ensure that the response being shown belongs to the latest input?

Why a state update after await may not be a Transition

In an async Action, React’s documented limitation is that state updates after an await are not automatically treated as Transitions. If the code needs that later update to be a Transition, wrap it in another startTransition.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const [isPending, startTransition] = useTransition();

function loadResults(query) {
  startTransition(async () => {
    const results = await fetchResults(query);

    // Mark the post-await state update explicitly.
    startTransition(() => {
      setResults(results);
    });
  });
}

This addresses transition marking, not the correctness of which response wins. The async Action’s pending state and the application’s data-ordering policy are related concerns, but they are not interchangeable.

Why correct transition marking cannot prevent stale results

Requests can overlap and resolve in a different order from the order in which the user started them. For example, a person types “a” and then “ab”; if the request for “ab” finishes first and the older “a” request finishes last, unguarded result updates can leave the input showing “ab” while the results correspond to “a.”

  1. The user enters “a,” starting request A.
  2. The user enters “ab,” starting request AB.
  3. Request AB resolves and displays results for “ab.”
  4. Request A resolves later and overwrites the results with data for “a.”

Wrapping updates in startTransition does not, by itself, establish which request is newest. The application needs to guard against stale results—for example, by associating responses with the query or request that produced them and applying only the result that is still current. The official reference discusses out-of-order Transition updates, and React issue #28914, opened April 25, 2024, captures the “ab” input with results for “a” confusion. Issue reports describe particular cases; they are not guarantees about every implementation.

When pending becomes true but does not return to false

A separate report, React issue #28923, opened April 26, 2024, describes pending remaining true in a particular React 19 reproduction. Its ingredients were a promise in state, use() under Suspense, and a parent update started inside a Transition. The reporter observed that pending became true but did not return to false after completion.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The issue is closed and links to issue #29670. The available issue record does not establish the final fix or the affected release range. Treat it as a report about that reproduction, not evidence that current React releases generally leave isPending stuck—or that this is necessarily the second bug in a particular implementation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose the React 19 API around the interaction

React 19 introduced Actions alongside APIs including useOptimistic and useActionState. The right choice depends on the shape of the work, not on a single hook being a universal repair. React’s React 19 announcement, published December 5, 2024, describes these APIs.

Interaction What to consider
Manually initiated work useTransition fits when code starts the update and needs a pending flag. Explicitly mark state updates after await when they must be Transitions.
Form-driven Action Consider useActionState for Action state associated with a form workflow.
Immediate optimistic feedback Consider useOptimistic when the interface should show an optimistic state while an Action is in progress.
Overlapping async requests Whichever API is used, decide how to reject or ignore stale results; Transition marking alone does not order network responses.
Suspense with use() Compare the exact reproduction with the reported issue before attributing a stuck pending flag to a general React 19 behavior.

For the relevant documented behaviors, consult React’s useTransition reference and use reference. They describe supported semantics; repository issues provide dated reports tied to specific reproductions.

A practical debugging sequence

  1. Locate the state update. Check whether it occurs before or after an await. If it is after, wrap it in another startTransition when it must be treated as a Transition.
  2. Trace request identity. For every result update, identify which input or request produced the data. Verify that an older response cannot overwrite a newer one.
  3. Inspect pending separately. Determine which Action is expected to keep isPending true and when that Action completes. Do not use the flag as proof that displayed results are current.
  4. If Suspense and use() are involved, compare the exact promise-in-state and parent-update pattern with the reproduction in issue #28923; the report alone does not establish a general release-wide defect.
  5. Match the API to the workflow. Use the appropriate Action or optimistic-state API for form-driven and optimistic interactions; keep useTransition for manually initiated transition work that needs its pending state.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.