Skip to content

Commit

Permalink
docs(server-actions): add missing formData type (#73257)
Browse files Browse the repository at this point in the history
This PR adds the missing `FormData` type annotation to the formData
parameter in the server actions example.

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
  • Loading branch information
devpla and delbaoliveira authored Nov 27, 2024
1 parent a771ce2 commit a168d74
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ export function Thread({ messages }: { messages: Message[] }) {
string
>(messages, (state, newMessage) => [...state, { message: newMessage }])

const formAction = async (formData) => {
const formAction = async (formData: FormData) => {
const message = formData.get('message') as string
addOptimisticMessage(message)
await send(message)
Expand Down

0 comments on commit a168d74

Please sign in to comment.