Replies: 1 comment
-
Nothing, this should work. Please show a reproduction |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to pass a parameter to the queryFn that can be used in the query string used to get data from my API. I thought it would simply be a case of using a dependent variable in the query key:
"Adding dependent variables to your query key will ensure that queries are cached independently, and that any time a variable changes, queries will be refetched automatically"
So I'm using a queryKey like this: ['assets', this.filter]
However, when the value of this.filter is changed (it's linked to a search field), the query is not being refetched and if I manually refetch() the data, the new value of this.filter still isn't applied.
What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions