Property 'action' does not exist on type Button
Unanswered
Cuvier’s Dwarf Caiman posted this in #help-forum
Cuvier’s Dwarf CaimanOP
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.
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 ?
<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 ?
5 Replies
@Cuvier’s Dwarf Caiman 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 ?
sounds like it, it should be
<form action={...}> or <button formAction={...}>Cuvier’s Dwarf CaimanOP
that is what i thought, but it's in the docs with only action on the button
yeah looks like a doc mistake
Cuvier’s Dwarf CaimanOP
something to raise on GIT for fixing ?
@Cuvier’s Dwarf Caiman something to raise on GIT for fixing ?
yup that's what i would do. please open an issue on github