next-learn
next-learn copied to clipboard
chapter 12 :Creating an invoice
I have reached chapter 12 Mutating Data.
In Creating an invoice,
when 3: Extract the data from formdata
I follow the code:
// Test it out: console.log(rawFormData);
but I can't find any log
I continue to the last. It should redirect, but nothing happen.
I guess async function createInvoice(formData: FormData) not be reached. But I don't know how to fix it.
the code is on https://github.com/liwenz/nextjs-dashboard
Have you tried looking at the terminal where you started the dev server?
createInvoice() is a server action so its output would not be visible in the client (i.e browsers)
Thanks, I have checked it. Also the redirect does not work. where could I find the chapter 12 code, eg. github
The code is fine,but my operation has some problem.Before 'createInvoice' button , I have not choosed 'Set the invoice status'.
instead of checking in the browser check in the terminal log because that form action is on server side