Course lesson

Handle Optimistic Updates With the Vue 3 useMutation Composable

In production, mutations aren't going to happen instantly. We can improve the UX by rendering the intended result before the actual mutation happens

Duration
3 min
Access
Included
Transcript
Retained from source evidence

In production, mutations aren't going to happen instantly. We can improve the UX by rendering the intended result before the actual mutation happens

In this lesson, we will learn how to handle optimistic updates by simulating an internet connection with a setTimeout and using optimisticResponse from the useMutation composable to handle the update.