next-safe-actionplayground
Overview
  • Home
Core
  • Core Actions
  • Validation Errors
  • Middleware
Hooks
  • React Hooks
  • Optimistic Updates
Forms
  • Form Integration
  • React Hook Form
Framework
  • Navigation & Framework
  • GitHub

React Hooks

useAction hook with full status tracking, callbacks, forms, and state updates.

useAction Full Demo
All return properties: execute, executeAsync, result, status, reset, input, and all status flags.
Status:Idle
isIdle: trueisExecuting: falseisTransitioning: falseisPending: falsehasSucceeded: falsehasErrored: false
Result:
{}
Callback Inspector
All callbacks (onExecute, onSuccess, onError, onSettled) logged with timestamps. Use the form above to trigger events.

No callback events yet. Execute an action to see them here.

Stateless Form
Form using useAction + execute to submit FormData directly.
Status:Idle
Result:
{}
State Update via onSuccess
Local state updated through the onSuccess callback when the action completes.

Local state: (none)

Status:Idle
Result:
{}