Skip to content

Commit

Permalink
Fix with example in action Reference (#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
amirhhashemi authored Jan 2, 2025
1 parent 17509cd commit 636001e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/routes/solid-router/reference/data-apis/action.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

Expand Down

0 comments on commit 636001e

Please sign in to comment.