Replies: 3 comments
-
Even TypeScript didn't get me too far: export interface DefaultOptions<TError = unknown> {
queries?: QueryObserverOptions<unknown, TError>
mutations?: MutationObserverOptions<unknown, TError, unknown, unknown>
} |
Beta Was this translation helpful? Give feedback.
-
it's basically:
and then inside Queries, you put in whatever you would normally pass to An example can also be found here: https://tanstack.com/query/v4/docs/react/reference/QueryClient#queryclient |
Beta Was this translation helpful? Give feedback.
-
Yes! That's the page I was looking for and couldn't find. I suggest renaming this page or make it more obvious/findable. ...and it's misleading to say
Yes, it's true, it can be used to interact with the cache, but it's actually much much more than that:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using React and here's how I initialize
QueryClientProvider
in myApp.tsx
:I found out that default
QueryClient
configuration is a bit too aggressive for my liking and I wanted to change it.I went to the documentation site (I use v4, which is latest).
Checked here: https://tanstack.com/query/v4/docs/react/guides/important-defaults
And here: https://tanstack.com/query/v4/docs/react/reference/QueryClient#queryclientgetdefaultoptions
Searched for:
default
,option
...I found some scarce options documentation in the examples and here:
https://tanstack.com/query/v4/docs/react/reference/useQuery
I think
new QueryClient()
config options documentation is extremely important. Am I missing something obvious here?Beta Was this translation helpful? Give feedback.
All reactions