Replies: 1 comment 5 replies
-
I'm still learning this, but think you would want to declare your queries at the top, then make use of useQuery()'s Perhaps you could compose the status of Feel free to post a sandbox with what you're trying to do. |
Beta Was this translation helpful? Give feedback.
5 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.
-
Is there way to fetch/refetch only if certain states change with useQuery, similar to the dependency list of useEffect? Right now, react-query, I use the React useEffect hook to fetch.
React.useEffect(() => {
fetch().then((res) => {});
}, [props.query]);
Is there a similar pattern that I can use in react-query?
Beta Was this translation helpful? Give feedback.
All reactions