Implement addItem():
- form submit handler
fetch("/new_item", { method: "POST", ... })
- send the body in the same format as the lecture slide
- render the updated list after success
fetch("/new_item", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({ text: text }),
});
Checkpoint: adding an item updates the list without page reload.