We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d677bd commit 04c080dCopy full SHA for 04c080d
website/docs/integrations/react-hook-form.md
@@ -32,10 +32,12 @@ Here we define our action. The only difference is that we will import the schema
32
```typescript title="buyproduct-action.ts"
33
"use server";
34
35
-import { action } from "@/lib/safe-action";
+import { actionClient } from "@/lib/safe-action";
36
import { schema } from "./validation";
37
38
-export const buyProduct = action(schema, async ({ productId }) => {
+export const buyProduct = actionClient
39
+ .schema(schema)
40
+ .define(async ({ productId }) => {
41
// We're just returning the productId passed to the action here.
42
return {
43
productId,
0 commit comments