Next.js Discord

Discord Forum

useFormState with bound variables

Unanswered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
Is it possible to bind variables with a useFormState?

1 Reply

@Dwarf Crocodile Is it possible to bind variables with a useFormState?
bind variable to server action?
yes
const [state, formAction] = useFormState(serverAction.bind(null, variable), {})