# useActionData()

> 

Use `useActionData()` to read the latest action result for the current matched route node.

```ts
const actionData = useActionData()
```

## Related APIs

- `useActionState()`
- `useRouteActionData(routeId)`
- `useFormAction()`

## `useActionState()`

`useActionState()` returns a richer object:

- `data`
- `error`
- `status`

Status is one of:

- `idle`
- `submitting`
- `success`
- `error`

## `useRouteActionData(routeId)`

Use route ids for the strongest typing:

```ts
const layoutActionData = useRouteActionData('layout')
```

If you omit the route id, Horn resolves the parent route id relative to the current matched node.

## `useFormAction()`

`useFormAction(action?)` resolves the effective action URL for the current route when you want to wire forms manually.
