Closed Exzotic5485 closed 1 week ago
Hi, if you are using useServerAction
with an action with type
as formData
, you can pass in additional data in the second argument of the execute
method.
In this example, name
comes from the form and I pass in the other args through code.
Still thinking about a bind
solution, but lmk if this solves your problem.
Hi, just made a release to hopefully make this easier. Please try upgrading to zsa-react@0.2.2
and checkout these docs
Going to close this issue for now -- lmk if this still doesn't solve your problem.
It would be nice to be able to pass multiple arguments to the server action, this would make it easier to pass additional arguments with the
bind
method as this can be done with server actions normally.For reference: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations#passing-additional-arguments