useMutation question
I am currently trying to replicate this react hook and confused about the intended functionality.
link to the hook:
https://github.com/wagmi-dev/wagmi/blob/main/packages/react/src/hooks/accounts/useConnect.ts
It seems that the useMutation hook should run again when the connector argument changes so that we can generate a new mutationKey. However, when I put this function in a watchEffect in the setup function of a vue component I am unable to re-run the useMutation hook and get the error 'vue-query hooks can only be used in the setup funciton'
link to the hook:
https://github.com/wagmi-dev/wagmi/blob/main/packages/react/src/hooks/accounts/useConnect.ts
It seems that the useMutation hook should run again when the connector argument changes so that we can generate a new mutationKey. However, when I put this function in a watchEffect in the setup function of a vue component I am unable to re-run the useMutation hook and get the error 'vue-query hooks can only be used in the setup funciton'
GitHub
React Hooks for Ethereum. Contribute to wagmi-dev/wagmi development by creating an account on GitHub.