Replies: 1 comment
-
sorry to say but please don't open issues unless you are sure that there is an actual, reproducible issue with the library. I will move this to discussions so that we can keep talking about it some more. That said, the best thing you can do is try to reproduce your issue in an isolated case, for example with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This might be just a mistake that a javascript newbie has made, not a bug of your wonderful product. But your comment will be a big help for me to solve this problem. Thank you for your time. 🙏
Describe the bug
Situation: I cannot update "nickname(string)" in my address card.
Problem:
useMutation
behaves unexpectedly (gets or passes wrong value)When I use
useMutation
and pass{id, nickname, ...address}
to update my address card, it behaves like it remembers the previous value (ofnickname
) and neglects the new value.The types of data that I pass are as below.
If I simply change the order of arguments from
{id, nickname, ...address}
to{...address, id, nickname}
, for some reason, I succeed to change the value. It seems like it does not neglect the new value anymore, then.Still, I need to refresh the page to see the updated nickname on the card...!
What's interesting is...😭 instead of updating the nickname, when I try to update the address, which is data in an object, it works well.
Please tell me what I am missing... Any comment will be so helpful 🙏
To Reproduce
Steps to reproduce the behavior:
You can also see the codes here
Expected behavior
mutate
function to get the value of thenickname
that I pass to it and pass it to fetch function.Screenshots
2021-08-01.1.48.49.1.mp4
Codes in the video are here (useMutateAddress)
The function
updateAddress
is called here (UserAddressForm)The userAddressList is fetched here (UserContext)
Desktop
Additional context
Default options are like below (in App.js)
Beta Was this translation helpful? Give feedback.
All reactions