API ReferenceReact provider and hooksInterface
UseWorkflowLifecycleOptions
Beta
Options for useWorkflowLifecycle.
Properties
onSettled?
optional onSettled?: (settlement) => void;Beta
Called once when the run settles, with the same value the hook returns as settlement.
A convenience for surfaces that navigate or record on settlement. Omitting it does not hide failure:
settlement is returned state, so a consumer that renders the hook’s result cannot silently drop
it.
Parameters
| Parameter | Type |
|---|---|
settlement | WorkflowSettlement |
Returns
void
operations?
optional operations?: WalletOperation<AnvilWalletOperationType>[];Beta
Terminal operations from an earlier run of this workflow.
When present and non-empty, the hook does not execute: the run already happened and this snapshot is what it left behind. This is how a surface that remounts with a completed workflow shows the result instead of re-prompting the wallet.