TanStackT
TanStack2y ago
2 replies
improved-purple

Global error handling & Localization

Hi there!

I have a question related to global error handling and localization.

Since the
QueryClient
is created "outside" of react for stability (currently I'm using useState to persist it on potential re-renders), my normal approach of using my useTranslations hook for translations is not viable without re-creating the
QueryClient
.

Would you advice me to re-create the
QueryClient
in this case when the locale changes, or do you have other suggestions of how I can implement this?
Was this page helpful?