Refetching when prop changes? #1570
-
|
I'm having trouble figuring out how to make my I've created a custom hook that looks like this: Essentially depending on the I'm creating my hook like this: And yet Should I pass the query string to the key? Kind of lost, let me know if you need any more info. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
yes. Every time the key changes, react-query will refetch. It’s kinda like a dependency array to a useEffect. |
Beta Was this translation helpful? Give feedback.
yes. Every time the key changes, react-query will refetch. It’s kinda like a dependency array to a useEffect.