How to fire mutation with url query param only once
I have a simple page that has a url like that:
Now when the user visits that page I want to confirm the email with the token from the url with useMutation.
However the mutation is firing in a loop, how can I avoid this?
/confirm-email?token=<token-value>Now when the user visits that page I want to confirm the email with the token from the url with useMutation.
However the mutation is firing in a loop, how can I avoid this?
Solution
https://github.com/trojanowski/react-apollo-hooks/issues/205#issuecomment-1032336686
found a solution here. sneaky one
found a solution here. sneaky one
GitHub
I'm attempting to perform a mutation when a specific route is hit in my application. When using useEffect and passing through a mutation method as a dependancy, it enters an infinite loop. cons...