UseQuery loading spinner showing right away! :(
hey guys im running into an issue where my useQuery ispending state is showing right away! even though im using enabled: false!
im triggering the query to run manually by using refetch()
but for some reason it shows the spinner instantly even though i havent called refetch() yet
heres some context: would gladly appreciate some help
i previously had it as just isSubredditsPending that showed the spinner instantly but then i added searchTerm.trim()
and it didnt show it instantly but now as soon as i type a letter it shows the spinner even though i have clicked search button yet
heres my manual refetch call
the search button triggers this!
i need some guidance as to what im doing wrong and how can i fix this
im triggering the query to run manually by using refetch()
but for some reason it shows the spinner instantly even though i havent called refetch() yet
heres some context: would gladly appreciate some help
i previously had it as just isSubredditsPending that showed the spinner instantly but then i added searchTerm.trim()
and it didnt show it instantly but now as soon as i type a letter it shows the spinner even though i have clicked search button yet
heres my manual refetch call
the search button triggers this!
i need some guidance as to what im doing wrong and how can i fix this