T
TanStack15mo ago
xenogeneic-maroon

v5 codemod does not work with query key variables outside the file

The remove-overloads codemod isn't working for all of my queries, which look like this:
return useQuery(queryKeys.globalApy, handleFetchApy)
return useQuery(queryKeys.globalApy, handleFetchApy)
queryKeys is a variable from another file, and the value of queryKeys.globalApy is ['global-apy'] As soon as I replace the variable with its inline value:
return useQuery(['global-apy'], handleFetchApy)
return useQuery(['global-apy'], handleFetchApy)
It suddenly works for said file. Is there anything I may be doing wrong? Is this probably from my ts config?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?