Method UseTransition
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
UseTransition()
Returns the pending state and starter for low-priority updates.
public static (bool isPending, TransitionStarter startTransition) UseTransition()
Returns
- (bool isPending, TransitionStarter startTransition)
2-tuple in the order (
isPending,startTransition):isPending: true while an update this starter's callback scheduled is queued or being committed — through the terminal reconcile slice, wherever the state it wrote lives — and across an async transition's awaits.startTransition: a TransitionStarter, reference-stable across renders. CallstartTransition.Invoke(() => ...)for synchronous updates orstartTransition.Invoke(async () => ...)for async actions whoseisPendingstays true across awaits. A re-entrant call on the same starter joins the transition already running on it; a starter from anotherUseTransition()is a separate transition with its ownisPending, even while the first one is still awaiting.