T
TanStack•3y ago
foreign-sapphire

whats the best way to handle error state ?

i dont want to set these on every file so i put here is this correct way or wrong ?
No description
5 Replies
foreign-sapphire
foreign-sapphireOP•3y ago
@TkDodo 🔮 kindly guide me on this
flat-fuchsia
flat-fuchsia•3y ago
sure
foreign-sapphire
foreign-sapphireOP•3y ago
@TkDodo 🔮 ?
flat-fuchsia
flat-fuchsia•3y ago
sure as in: "yes that's fine"
extended-salmon
extended-salmon•3y ago
There is also the QueryCache https://tanstack.com/query/v4/docs/react/reference/QueryCache#global-callbacks There are some subtle differences as noted in the docs there
QueryCache | TanStack Query Docs
The QueryCache is the storage mechanism for TanStack Query. It stores all the data, meta information and state of queries it contains. Normally, you will not interact with the QueryCache directly and instead use the QueryClient for a specific cache.

Did you find this page helpful?