Use when executing next-safe-action actions from React client components -- useAction, useOptimisticAction, handling status/callbacks…
next-safe-action React Hooks
Import
// All hooks
import { useAction, useOptimisticAction, useStateAction } from "next-safe-action/hooks";
// Backward-compatible re-export (same useStateAction hook)
import { useStateAction } from "next-safe-action/stateful-hooks";
useAction — Quick Start
"use client";
import { useAction } from "next-safe-action/hooks";
import { createUser } from "@/app/actions";don't have the plugin yet? install it then click "run inline in claude" again.