-
Notifications
You must be signed in to change notification settings - Fork 9
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
how work with mutate #14
Comments
for example, I make a request, but I don't get an error from 500 codes return fetch(url, {
method: 'POST',
body: JSON.stringify(data)
}).then(res => res.json())
|
@Suro4ek Hey there! 👋 First, here's a repro of the mutation that catches errors. Try clicking on +5 or -5 buttons, you'll see that in 20% of cases it reverts the changes to the cache and shows an error. So if something doesn't return errors to you, can you please provide a repro on stackblitz? Second is this:
I'm not sure what you're talking about here 🤔 If you're talking about bound mutator, then yes, we have it. But we typically advice to use mutation stores ( |
I'll close it for now, feel free to reopen if something's missing/unclear. |
as I understand it, I should just return fetch inside createMutatorStore, but is it possible to make a request to the mutate as in swr there in mutate useSWR('/api/user', fetcher)?
The text was updated successfully, but these errors were encountered: