next-safe-action React Hooks Import useAction — Quick Start useOptimisticAction — Quick Start useStateAction — Quick Start The server-side action must use (not ): Return Value All hooks ( , , ) return: | Property | Type | Description | |---|---|---| | | | Fire-and-forget execution | | | | Returns a promise with the result | | | | Last input passed to execute | | | | Last action result — discriminated union of 4 branches (idle / success / serverError / validationErrors); narrowed when you check or any shorthand | | | | Resets all state to initial values | | | | Current status string | | | | No…