Skip to content

Type for query with 0 parameters #1548

Answered by markerikson
ChuckJonas asked this question in Q&A
Discussion options

You must be logged in to vote

You always have to pass a "query cache key" as the first arg to a useQuery() hook. In this case, the correct cache key would be undefined. So: useGetPostsQuery(undefined, {refetchOnFocus: true}).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ChuckJonas
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