Next.js Discord

Discord Forum

How to pass an array of object to a server action function ?

Unanswered
Long-horned bees posted this in #help-forum
Open in Discord
Long-horned beesOP
I am new to server actions and don't understand this error when using server action function and useFormState !!

Code demo :
import { createCategory } from "@/app/actions/category/action";
const updatedCreateForm = createCategory.bind(null,sections);
return(
<form action={updatedCreateForm}.......></form>

// Where can I read or learn about server actions better do share if you know

3 Replies