Skip to content

Commit 04c080d

Browse files
committedApr 3, 2024··
docs(website): fix React Hook Form example
1 parent 3d677bd commit 04c080d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎website/docs/integrations/react-hook-form.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ Here we define our action. The only difference is that we will import the schema
3232
```typescript title="buyproduct-action.ts"
3333
"use server";
3434

35-
import { action } from "@/lib/safe-action";
35+
import { actionClient } from "@/lib/safe-action";
3636
import { schema } from "./validation";
3737

38-
export const buyProduct = action(schema, async ({ productId }) => {
38+
export const buyProduct = actionClient
39+
.schema(schema)
40+
.define(async ({ productId }) => {
3941
// We're just returning the productId passed to the action here.
4042
return {
4143
productId,

0 commit comments

Comments
 (0)
Please sign in to comment.