Module '"wagmi"' has no exported member 'useQuery'.ts(2305) #4017
-
Hi I have an existing react typescript app in which I have to install rainbowkit. I have installed the rainbowkit and updated the viem and wagmi version from 1.x for wagmi to 2.x. Currently I am getting this error on useQuery from wagmi (Module '"wagmi"' has no exported member 'useQuery'.ts(2305)). I am new to wagmi integration but can someone kindly guide me if in the new updates have removed useQuery from wagmi or does it have some equivalent implementation? i know there is a useQuery from the import is as follows: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I have resolved it. So the implementation and import has been changed. Now
also now it expects an object as argument instead of separate 3 arguments. |
Beta Was this translation helpful? Give feedback.
I have resolved it. So the implementation and import has been changed. Now
useQuery
is being imported fromwagmi/query
instead of justwagmi
so like the followingimport { useQuery } from "wagmi/query"
also now it expects an object as argument instead of separate 3 arguments.