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) })