Passer au contenu principal

Documentation Index

Fetch the complete documentation index at: https://kubo-47e69177.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

useAction

Signature

packages/react/src/useAction.ts
export function useAction<TInput, TOutput>(
  action: DefinedAction<TInput, TOutput>
): UseActionResult<TInput, TOutput>

Etat retourne

ChampTypeDescription
execute(input: TInput) => Promise<TOutput>Execute l’action
dataTOutput | undefinedDerniere valeur en succes
errorunknownDerniere erreur
statusidle | pending | success | errorEtat courant
reset() => voidReinitialise l’etat