#ChangeAction
And this UX is the same no matter what you do in the action. Later you could do:

<Input
changeAction={async text =>
await save(text);
setText(text);
}
/>

And the input is immediate, which the async is deferred.
January 18, 2026 at 11:04 PM
I've been wanting to help here recently. At ReactConf last year Andrew suggested libs like Radix should start accepting action* props in addition to on* event handlers.

Example would be

<Switch changeAction={updatePreference}>

If the transition/optimistic was baked in, you could pass in
August 1, 2025 at 6:49 PM
Which means, you can have an Input component that has a changeAction prop (instead of onChange). The changeAction prop wraps the callback in startTransition and you don’t have to write startTransition anywhere else outside that component
January 18, 2026 at 10:58 PM
But you can go further, and move the optimistic text input update into Input, then you can just do:

<Input changeAction={setText} />

Now there’s no useOptimistic or startTransition for the basic case of using a text input.
January 18, 2026 at 11:02 PM
<Input
value={optimisticText}
changeAction={text =>
setOptimisticText(text)
setText(text)
}
/>
January 18, 2026 at 11:01 PM