#Property 'action' does not exist on type Button

6 messages · Page 1 of 1 (latest)

hazy copper
#

i can see in the documentation ( https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations ) at Closures and encryption action is used on the button.

<button action={publish}>

but if i try to use it get TS error that action is not allowed on the button.

is there some sort of set-up require to use action on the button or is it doc issue ?

Learn how to handle form submissions and data mutations with Next.js.

humble sorrelBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

humble olive
hazy copper
#

that is what i thought, but it's in the docs with only action on the button

humble olive
#

yeah looks like a doc mistake

hazy copper
#

something to raise on GIT for fixing ?