From 636001e02d82a8ffd5757a52c2d2b399d4aaa70e Mon Sep 17 00:00:00 2001 From: Amir Hossein Hashemi <87268103+amirhhashemi@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:20:23 +0330 Subject: [PATCH] Fix `with` example in `action` Reference (#997) --- src/routes/solid-router/reference/data-apis/action.mdx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/routes/solid-router/reference/data-apis/action.mdx b/src/routes/solid-router/reference/data-apis/action.mdx index c86aa33cb..3e19e1cf2 100644 --- a/src/routes/solid-router/reference/data-apis/action.mdx +++ b/src/routes/solid-router/reference/data-apis/action.mdx @@ -46,9 +46,8 @@ const deleteTodo = action(async (formData: FormData) => { Using `with`: -```jsx del={6,7} ins={8} -const deleteTodo = action(async (formData: FormData) => { - const id = Number(formData.get("id")) +```jsx del={5,6} ins={7} +const deleteTodo = action(async (id: number) => { await api.deleteTodo(id) })