-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api): add useQuery, useMutation, useGet composables #409
Conversation
✅ Deploy Preview for sefirot-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for sefirot-story ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
do we have use cases where we want to mutate loading or data from outside the composable? like maybe to reset or something? |
@brc-dd // Get single user.
const { data: user } = useQery(() => /* ... */)
const { execute: updateUser } = useMutation(() => /* ... */)
function updateUser(newUser) {
// Update user directly since we don't need to re-fetch.
user.value = newUser
updateUser(/* ... */)
} |
ok updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the docs! Please feel free to merge it when ever you feel like it 👍
closes #398