When you need to modify the requested data. You can use mutate() to directly modify data

By the way, the above example is just a simple example. In real business, if you just make some simple modifications to data, we recommended to use computed.

const { data } = useRequest(getUser);
const slogan = computed(() => `Welcome, ${data.value}!`);
Last Updated: 7/1/2022, 8:28:34 AM
Contributors: John