Skip to content
Discussion options

You must be logged in to vote

Well, I fixed this with passing queryFn arguments from queryKey. IDK why exactly this works, but somehow this fixed an issue:

const { isLoading, error, data, isFetching, refetch } = useQuery({
    queryKey: ['latestRecord', displayCurrency], // here I added displayCurrency in queryKey
    queryFn: ({queryKey}) => getSummaryData(queryKey[1]) // getting value from queryKey
  })

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@kapobajza
Comment options

@skorphil
Comment options

Answer selected by skorphil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants