Update items
This is the U in CRUD.
Updating items is similar to creating them. We just need to have a unique identifier for each todo item to make sure the API updates the correct item. Without a database which generates unique IDs for us, we will use a temporary trick until we learn how to use a database later in the course.
This is a great example of a real-world scenario where you may wait for the backend team to provide a database integration, but you don't want to be blocked until that integration is in place.
HTML <form>
elements do not provide a method="patch"
(PATCH
is often used as the HTTP method to update data), so we will learn a neat trick SvelteKit provides to still make this work nicely.