-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
feature requestNew feature or requestNew feature or request
Description
Now that mutate support passing an async function to get the data it will be helpful to get that data as return value of mutate.
const data = await mutate('/api/data', fetch('/api/data').then(res => res.json()))
// use dataThis way if I want to use the data right now for something else I don't need to use the old way of first fetch and await and then pass the data to mutate and return it below.
const data = await fetch('/api/data').then(res => res.json());
mutate('/api/data', data)
// use datashuding and vjpr
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or request