Unverified Commit c355fb1a authored by vinay's avatar vinay Committed by GitHub

(Docs) Remove `FormData` type on `formData` defined in `.js` file (#53014)

parent 2cd0c8ab
...@@ -455,7 +455,7 @@ function ExampleServerComponent({ id }) { ...@@ -455,7 +455,7 @@ function ExampleServerComponent({ id }) {
'use client' 'use client'
function ExampleClientComponent({ updateItem }) { function ExampleClientComponent({ updateItem }) {
async function action(formData: FormData) { async function action(formData) {
await updateItem(formData) await updateItem(formData)
} }
...@@ -497,7 +497,7 @@ export const action = withValidate((data) => { ...@@ -497,7 +497,7 @@ export const action = withValidate((data) => {
```js filename="lib/form-validation.js" ```js filename="lib/form-validation.js"
export function withValidate(action) { export function withValidate(action) {
return async (formData: FormData) => { return async (formData) => {
'use server' 'use server'
const isValidData = verifyData(formData) const isValidData = verifyData(formData)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment