It could be that the query is being used in the ListLinks component and in CreateLink component to check for updates. I had to do this to make the link show on url redirect without hard refreshing the browser. There is probably a more efficient way to do it with a useRef or useMemo, but I just wanted to get it working.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
When i try to console log data from useQuery it prints in console 3 times, and causes re render , why do you think that's happening?
It could be that the query is being used in the ListLinks component and in CreateLink component to check for updates. I had to do this to make the link show on url redirect without hard refreshing the browser. There is probably a more efficient way to do it with a useRef or useMemo, but I just wanted to get it working.