本页还没有译文
本页 5 段还没译成Français,下面显示的是英文原文。QueryCacheConfig
还没翻译译自英文(tanstack.com)本页 5 段都还没译
Defined in: packages/query-core/src/queryCache.ts:25
Global callbacks that fire for every query handled by a QueryCache, regardless of which
component or observer triggered it. Unlike QueryClient's defaultOptions, which a query can
override, these callbacks are always called. Unlike MutationCacheConfig's callbacks, these
are fire-and-forget: their return value is not awaited before the query settles.
Properties
| Property | Type | Description |
|---|---|---|
onError? | (error: Error, query: Query<unknown, unknown, unknown>) => void | Called when any query in the cache encounters an error. |
onSettled? | (data: unknown, error: Error | null, query: Query<unknown, unknown, unknown>) => void | Called when any query in the cache is settled, either successfully or with an error. |
onSuccess? | (data: unknown, query: Query<unknown, unknown, unknown>) => void | Called when any query in the cache is successful. |
AI 翻译查看英文原文