[Server Action] On form submit, how do I relay to client if submission was a success?
Answered
Spectacled bear posted this in #help-forum
Spectacled bearOP
Answered by Mozzy
Just return whatever you want from the server action.
const doSomething = async (formData: FormData) => {
const returnedValue = await submit(formData);
console.log(returnedValue)
}1 Reply
Just return whatever you want from the server action.
const doSomething = async (formData: FormData) => {
const returnedValue = await submit(formData);
console.log(returnedValue)
}Answer