Skip to main content

Returns

A function that dispatches an action to the host app. Use this for side effects like analytics events, deep links, or native integrations.
options
object
required
Action options.

Usage

Track an analytics event

Add to cart

Notes

  • useAction must be called inside a component body function, not at the top level.
  • Actions are fire-and-forget. There is no return value or callback for completion.
  • The host app defines which action names are supported and how they are handled.
  • All prop values must be strings.

See Also