Returns
A function that dispatches an action to the host app. Use this for side effects like analytics events, deep links, or native integrations.Action options.
Usage
Track an analytics event
Add to cart
Trigger a deep link
Notes
useActionmust be called inside a componentbodyfunction, 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
- useNavigate — programmatic navigation