Skip to content

Commit 411f030

Browse files
docs: improve skipToken refetch incompatibility warning (#9816)
docs: improve skipToken and refetch incompatibility warning - Add detailed explanation of Missing queryFn error when using refetch() with skipToken - Provide clear guidance to use enabled: false instead for manual refetching - Systematic fix affects all frameworks (Vue, Angular, Solid) via inheritance Fixes #7599
1 parent f5363e2 commit 411f030

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/framework/react/guides/disabling-queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ so it will only be true if the query is currently fetching for the first time.
9797

9898
If you are using TypeScript, you can use the `skipToken` to disable a query. This is useful when you want to disable a query based on a condition, but you still want to keep the query to be type safe.
9999

100-
> IMPORTANT: `refetch` from `useQuery` will not work with `skipToken`. Other than that, `skipToken` works the same as `enabled: false`.
100+
> **IMPORTANT**: `refetch` from `useQuery` will not work with `skipToken`. Calling `refetch()` on a query that uses `skipToken` will result in a `Missing queryFn` error because there is no valid query function to execute. If you need to manually trigger queries, consider using `enabled: false` instead, which allows `refetch()` to work properly. Other than this limitation, `skipToken` works the same as `enabled: false`.
101101
102102
[//]: # 'Example3'
103103

0 commit comments

Comments
 (0)