rare-sapphire
rare-sapphire2y ago

Resource in useCustomMutation successNotification parameter

How do I access or pass a resource name into useCustomMutation? I use this hook to have a reordering feature on my list.tsx page, and when I have the code like on screenshot it gives resource undefined. What should I do to have resource correctly set? (Also, offtopic as a general wish: try to somehow migrate this whole "help" discord to github wiki or any other publicly available platform. Discord is not parsable through search engines, so first you loose developers attention when they try to find a solution, and at the same time you loose SEO points for being mentioned. )
No description
7 Replies
kapa.ai
kapa.ai2y ago
Sorry @metammodern, I am experiencing especially high traffic right now, please try again. :technologist:
genetic-orange
genetic-orange2y ago
useCustomMutation does not know current resource. our docs has wrong example. we will fix this https://refine.dev/docs/api-reference/core/hooks/data/useCustomMutation/#successnotification
rare-sapphire
rare-sapphire2y ago
@arpentnoir yes, I'm aware of that, that's why I'm asking. How can I tell it the resource name? using useResource?
genetic-orange
genetic-orange2y ago
yes you can use useResource
rare-sapphire
rare-sapphire2y ago
hm, okay. Thank you
genetic-orange
genetic-orange2y ago
btw @metammodern your suggestions is great but we need to discus technical details. can you write this on #ideas-and-suggestions channel ? or you can open github issue if you want
rare-sapphire
rare-sapphire2y ago
Oh, alright, will do:) I will create it in github to also reflect this part of issue(redirecting users) okay look, I did it but when saving github showed me its stupid unicorn and now I'm pissed of. I'll create it later, I wrote a complete article on why this is wrong and now it is all flushed.