How to handle a function dependency of the query/mutation function?
Given a query or mutation where the query/mutation function depends itself on another function, will the query/mutation always run with the most up-to-date function? Should this be managed somehow? E.g.,
3 Replies
conscious-sapphire•14mo ago
Hi, the short answer is yes.
When
mutationFn
will be called it will call myFunc
which will point to the actual function returned from the useMyFunc
hook. So if useMyFunc
doesn't do anything stupid, then you are probably good.metropolitan-bronzeOP•14mo ago
Thanks!
conscious-sapphire•14mo ago
no problem 🙂