Skip to content
Discussion options

You must be logged in to vote

enabled option of useQuery. It does not stop useQuery to create cache. It creates a ["post", null] cache key.

The enabled option is still the way to go. Don't worry about the cache entry - the queryFn will not run when the query is disabled. It does show up in the devtools, but that's about it.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jashwant
Comment options

Answer selected by jashwant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants