Skip to content

Commit 10bdf8d

Browse files
authored
docs: fix sample code in tutorial text to match the exercise solution (sveltejs#463)
This commit fix sample code in the-form-element tutorial text, which is `01-the-form-element /README.md`, to match the exercise solution, which is `01-the-form-element/app-b/src/routes/+page.svelte`.
1 parent 3fe7f04 commit 10bdf8d

File tree

1 file changed

+2
-2
lines changed
  • content/tutorial/03-sveltekit/06-forms/01-the-form-element

1 file changed

+2
-2
lines changed

content/tutorial/03-sveltekit/06-forms/01-the-form-element/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Let's build a todo app. We've already got an in-memory database set up in `src/l
88

99
```svelte
1010
/// file: src/routes/+page.svelte
11-
<h1>Todos</h1>
11+
<h1>todos</h1>
1212
1313
+++<form method="POST">
1414
<label>
@@ -20,7 +20,7 @@ Let's build a todo app. We've already got an in-memory database set up in `src/l
2020
</label>
2121
</form>+++
2222
23-
{#each data.todos as todo}
23+
<ul class="todos">
2424
```
2525

2626
If we type something into the `<input>` and hit Enter, the browser makes a POST request (because of the `method="POST"` attribute) to the current page. But that results in an error, because we haven't created a server-side _action_ to handle the POST request. Let's do that now:

0 commit comments

Comments
 (0)