Skip to content

Commit

Permalink
docs(website): fix React Hook Form example
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEdoRan committed Apr 3, 2024
1 parent 3d677bd commit 04c080d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions website/docs/integrations/react-hook-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ Here we define our action. The only difference is that we will import the schema
```typescript title="buyproduct-action.ts"
"use server";

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

export const buyProduct = action(schema, async ({ productId }) => {
export const buyProduct = actionClient
.schema(schema)
.define(async ({ productId }) => {
// We're just returning the productId passed to the action here.
return {
productId,
Expand Down

0 comments on commit 04c080d

Please sign in to comment.