Q63: How do async functions work inside startTransition in modern React?
Modern React supports passing asynchronous functions directly to startTransition(async () => { await updateData(); }). React automatically marks the pending state (isPending) as true during the entire duration of the async operation and handles loading UI transitions seamlessly.
Key Takeaways
startTransitionaccepts async callbacks natively.isPendingremains true automatically throughout the awaited async operation.
Knowledge Check
What happens to the isPending flag when an async callback is passed to startTransition?