This lesson is for members. Join us?
Subscribe now to get instant access to this course, plus a full library of Vue.js courses tailored to the plan you choose.
Pinia Colada Mutations 101
In this lesson, learn how to trigger updates of data on your server with Pinia Colada mutations. The useMuatation composable is the go to place to trigger these async server side updates.
useMutation takes an async function called mutation that should do whatever async logic is necessary to update the data on your server. It returns a mutate function that you call whenever you want to trigger the server-side update along with some reactive asyncStatus.
Links
- Pinia Colada Docs > Mutations
- More info on why it’s important to clone props that are objects (from our Common Mistakes course)
